home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Information / THINK C Digest / 1994 / 94-05 < prev    next >
Text File  |  1995-12-31  |  292KB  |  8,169 lines

  1. Archive THINK-C/MESSAGES, file 94-05.
  2. Part 1/1, total size 290203 bytes:
  3.  
  4. ------------------------------ Cut here ------------------------------
  5. >From rmah@panix.com 1 May 94 02:08:46 GMT
  6. Path: ucivax!gateway
  7. From: rmah@panix.com ("Robert S. Mah")
  8. Subject: Re: 'matching prototypes
  9. Message-ID: <9404301908.aa10535@q2.ics.uci.edu>
  10. Content-Type: text/plain; charset="us-ascii"
  11. Mime-Version: 1.0
  12. Newsgroups: fa.think-c
  13. X-Message-ID: <199405010208.AA06136@panix.com>
  14. Approved: usenet@q2.ics.uci.edu
  15. Lines: 38
  16. Date: 1 May 94 02:08:46 GMT
  17.  
  18. At 11:58 PM 4/30/94 +0000, Clinton R Lefort wrote:
  19. > but still get this message last argumetn to function GetNewWindow does
  20. > not match prototype'
  21. > [...]
  22. > #define MOVE_TO_FRONT -1L
  23. > [...]
  24. > gHelloWindow = GetNewWindow( BASE_RES_ID , NIL_POINTER ,MOVE_TO_FRONT);
  25. >
  26. > The prototype seems to be
  27. >
  28. > pWindow := GetNewWindow(windowID,wStorage,behind);
  29.  
  30. That's not the prototype.  And looking at the header file, "windows.h"
  31. shows that the prototype is...
  32.  
  33. pascal WindowPtr GetNewWindow(short windowID,void *wStorage,WindowPtr behind)
  34.  
  35. So...the last argument must have the type "WindowPtr", which if you look
  36. further up the chain is the same as the type "GrafPtr" which is a struct.
  37.  
  38. Now, you have defined MOVE_TO_FRONT to be "-1L", which is of type "long".
  39.  
  40. Since "long" and "WindowPtr" (or "GrafPtr") are not the same type, the
  41. compiler rightly complains that your call does not match the prototype.
  42.  
  43. Change the #define MOVE_TO_FRONT to...
  44.  
  45.   #define MOVE_TO_FRONT   ((GrafPtr)-1L)
  46.  
  47. ..and all will be OK.
  48.  
  49. Cheers,
  50. Rob
  51.  
  52. ___________________________________________________________________________
  53. Robert S. Mah  -=-  One Step Beyond  -=-  212-947-6507  -=-  rmah@panix.com
  54.  
  55.  
  56. >From 99shafer@grog.lab.cc.wmich.edu 1 May 94 03:03:55 GMT
  57. Path: ucivax!gateway
  58. From: 99shafer@grog.lab.cc.wmich.edu ("Matthew E. Shafer")
  59. Subject: Re: 'matching prototypes
  60. Message-ID: <9404302003.aa12146@q2.ics.uci.edu>
  61. In-Reply-To: <9404301658.aa06414@q2.ics.uci.edu>
  62. Content-Type: TEXT/PLAIN; charset=US-ASCII
  63. Mime-Version: 1.0
  64. Newsgroups: fa.think-c
  65. X-Message-ID: <Pine.3.07.9404302259.A20858-b100000@grog>
  66. Approved: usenet@q2.ics.uci.edu
  67. Lines: 39
  68. Date: 1 May 94 03:03:55 GMT
  69.  
  70. On 30 Apr 1994, Clinton R Lefort wrote:
  71. >
  72. >
  73. >       gHelloWindow= GetNewWindow( BASE_RES_ID , NIL_POINTER ,MOVE_TO_FRONT);
  74. >       ShowWindow( gHelloWindow);
  75. >       SetPort( gHelloWindow);
  76. >       MoveTo(HORIZONTAL_PIXEL, VERTICAL_PIXEL );
  77. >       DrawString("\pHello, World");
  78. >       }
  79. >
  80. >
  81. > The prototype seems to be
  82. >
  83. > pWindow := GetNewWindow(windowID,wStorage,behind);but the code that I have
  84. >
  85. > gHelloWindow= GetNewWindow( BASE_RES_ID , NIL_POINTER ,MOVE_TO_FRONT);doesn't seem to take very well right now...
  86. > any suggestiosn as to how to make this prototype work...the manual says that
  87. > to move the window to the front you must use -1, Mark has -1L, I have tried both , but ot no avail>.
  88. >
  89. >
  90. > Thanks
  91. > Clinton R. LeFort
  92. >
  93.  
  94. The last param to GetNewWindow needs to by typcast as a window pointer.
  95. Change your macro to
  96.  
  97. #define MOVE_TO_FRONT (WindowPtr)-1L
  98.  
  99. -1 is a special value that can be passed to have the new window appear
  100. in front of all other windows regardless. It needs to be cast as a
  101. window pointer because you could pass any window pointer and the new
  102. window would appear just in front of that one.
  103.  
  104. .Matt
  105.  
  106.  
  107.  
  108.  
  109. >From bbedit@world.std.com 1 May 94 03:06:39 GMT
  110. Path: ucivax!gateway
  111. From: bbedit@world.std.com (Bare Bones Software)
  112. Subject: BBEdit for Power Macintosh: Announcement
  113. Message-ID: <9404302006.aa12301@q2.ics.uci.edu>
  114. X-Mailer: ELM [version 2.4 PL21]
  115. Content-Transfer-Encoding: 7bit
  116. Content-Type: text/plain; charset=US-ASCII
  117. Content-Length: 4273
  118. Mime-Version: 1.0
  119. Newsgroups: fa.think-c
  120. X-Message-ID: <199405010306.AA17011@world.std.com>
  121. Approved: usenet@q2.ics.uci.edu
  122. Lines: 91
  123. Date: 1 May 94 03:06:39 GMT
  124.  
  125. April 30, 1994
  126. For Immediate Release
  127.  
  128. Contact:
  129. Rich Siegel
  130. Bare Bones Software
  131. 1 Larkspur Way #4
  132. Natick, MA 01760
  133. Phone: (508) 651-3561
  134. Fax: (508) 651-7584
  135. Internet: bbedit@world.std.com
  136. CIS: 73051,3255
  137. AppleLink: BARE.BONES
  138.  
  139. Bare Bones Software announces BBEdit 3.0: High Performance Text Editor
  140. for Power Macintosh(R)
  141.  
  142. Natick, MA -- Bare Bones Software, publisher of the premier Macintosh
  143. text editor, BBEdit 2.5, is readying a new release of BBEdit with
  144. extended functionality, including support for Power Macintosh(R) systems.
  145.  
  146. BBEdit 3.0 will take advantage of native PowerPC(TM) code to greatly
  147. enhance the speed of common operations such as loading and saving files,
  148. and text editing, searching and transformation.
  149.  
  150. In addition to support for the newest Macintosh line, BBEdit 3.0 will
  151. feature a unique multi-file Compare facility, which can compare
  152. individual files, folders, or project documents for differences. When
  153. comparing folders or projects, BBEdit will display files which are
  154. common to both folders or projects, as well as files unique to each
  155. folder or project. Common files can be directly compared for
  156. differences. As the result of an alliance with SciComp Software, BBEdit
  157. 3.0 will also feature integrated PopupFuncs(TM) technology, which allows
  158. quick access to C, C++, or Pascal constructs defined in a source file
  159. via a popup menu in that file's window.
  160.  
  161. Other significant enhancements include support for user scripting via
  162. AppleScript, Frontier, or any other OSA-compliant scripting system, use
  163. of Macintosh Drag and Drop in the user interface and for text editing,
  164. and support for the AOCE "Standard Mail Package", so that users can
  165. compose, send, and read PowerTalk(R) mail messages from within BBEdit.
  166.  
  167. BBEdit 3.0 also features a number of user-interface enhancements,
  168. included in direct response to user comments and suggestions. In order
  169. to smooth the transition from other text-editing products to BBEdit,
  170. Bare Bones Software has included a number of new text transformations,
  171. including line sorting, generation of C function prototypes, line
  172. numbering, and organization of delimited words into rows and columns.
  173.  
  174. Response from beta testers has been enthusiastic. Tom Emerson, a
  175. software engineer in Symantec's Macintosh Development Tools Group, said,
  176. "The speed improvements on Power Macs are very impressive. Large files
  177. open much faster than before, and search and replace operations,
  178. particularly multi-file seaching, really fly. I'm able to get more work
  179. done in less time, thanks to BBEdit."According to Leonard Rosenthol,
  180. director of advanced technology at Aladdin Systems, "The new ability to
  181. compare folders has proven itself invaluable. I'm able to quickly
  182. compare two sets of source files and determine the differences between
  183. them, and integrate those differences. Until BBEdit 3.0 came along, it
  184. was a real chore." Chris Borton, senior software engineer at Storm
  185. Technology, Inc., said that "BBEdit 3.0's combination of ease of use,
  186. drag-and-drop text editing, XTND(TM) support, and integration with Symantec
  187. C++ have made it my ideal development environment."
  188.  
  189. BBEdit 3.0 is slated to ship in early June. The suggested retail price
  190. of BBEdit 3.0 will be $99.00.
  191.  
  192. Current BBEdit 2.5 owners can upgrade to the version 3.0 for $39.00
  193. (U.S. shipping & handling included). Customers who purchase BBEdit 2.5
  194. between May 1, 1994 and the shipping date of BBEdit 3.0 will be able to
  195. upgrade for $5.00 (within the U.S.), or $10.00 for Canadian and overseas
  196. customers (shipping and handling included).
  197.  
  198. Customers who are currently using a freeware version of BBEdit, or a
  199. competing or complementary product, can upgrade to BBEdit 3.0 for $69.00
  200. plus shipping and handling. (Contact Bare Bones Software for
  201. cross-upgrade information.) Students will be able to purchase BBEdit 3.0
  202. for $39.00.
  203.  
  204. For additional information, including quantity and site-license pricing,
  205. contact Bare Bones Software at the address given above.
  206.  
  207. --
  208.  
  209. PowerPC is a trademark of International Business Machines Corporation.
  210. Macintosh and PowerTalk are registered trademarks of Apple Computer, Inc.
  211. PopupFuncs is a trademark of SciComp Software.
  212. XTND is a trademark of Claris Corporation.
  213.  
  214. Other products mentioned are trademarked by their respective producers.
  215.  
  216. >From tjg8542@silver.sdsmt.edu 1 May 94 07:16:31 GMT
  217. Path: ucivax!gateway
  218. From: tjg8542@silver.sdsmt.edu ("Timothy J. Greear")
  219. Subject: Vector Tutorial problem
  220. Message-ID: <9405010016.aa19925@q2.ics.uci.edu>
  221. Newsgroups: fa.think-c
  222. X-Message-ID: <199405010716.BAA57852@silver.sdsmt.edu>
  223. Approved: usenet@q2.ics.uci.edu
  224. Lines: 28
  225. Date: 1 May 94 07:16:31 GMT
  226.  
  227.  
  228. Hi
  229. Can someone help me I have a Problem with my Symantec C++
  230. program. I am trying to run the Vector  Project Tutorial in the User Guide
  231. It fails I get a link error and these code statements:
  232.  
  233.      undefined: operator <<(ostream&,vector<char>&)
  234.      undefined: operator <<(ostream&,vector<myDate>&)
  235.      undefined: operator <<(ostream&,vector<float>&)
  236.      undefined: operator <<(ostream&,vector<int>&)
  237.  
  238.  
  239.  
  240. I have updated my program to version 7.0.  This is
  241. the free upgrade not the full featured version from Symantec.
  242.  
  243. What I have tried to do the following:
  244.  
  245. Tried to look for (ostream&,vector) using the find function  *no go*.
  246. Removed the objects after conversion of the IOstream
  247. library and brought it back up to date *no go*.
  248.  
  249. I have a Mac llsi with 9Mb.
  250.  
  251. Thanks
  252.  
  253. Timothy j. Greear
  254. tjg8542@silver.sdsmt.edu
  255. >From clefort@unix1.sncc.lsu.edu 1 May 94 08:03:18 GMT
  256. Path: ucivax!gateway
  257. From: clefort@unix1.sncc.lsu.edu (Clinton R Lefort)
  258. Subject: prototypes & bus error
  259. Message-ID: <9405010103.aa21913@q2.ics.uci.edu>
  260. Newsgroups: fa.think-c
  261. X-Message-ID: <9405010803.AA18006@unix1.sncc.lsu.edu>
  262. Approved: usenet@q2.ics.uci.edu
  263. Lines: 72
  264. Date: 1 May 94 08:03:18 GMT
  265.  
  266.  
  267. Hello,
  268.  
  269. I have tried the helpful suggestions of those who responded to my query,
  270. unfortunately I tried to run this code with the'debugger on' and I stepped thru
  271. the entire code , but whenit gets to the end of the code where it is asked to print "Hello world' I get the bus  error : 0x003FEFF6 at teh bottom of the debugger window....this occurs whether I place (WindowPtr)-1) (WindowPtr)-1 at rehdefines or at the function call to getHelloWindow:
  272.  
  273. gHelloWindow= GetNewWindow( BASE_RES_ID , NIL_POINTER , (WindowPtr)MOVE_TO_FRONT);
  274.  
  275. Here is the code again, maybe someone else would like to try it, and see if they get teh same response...I am running THINKC 6.0...
  276.  
  277.  
  278.  
  279.  
  280. #define BASE_RES_ID     400
  281. #define NIL_POINTER 0L
  282. #define MOVE_TO_FRONT   ((GrafPtr)-1L)
  283. #define REMOVE_ALL_EVENTS 0
  284. #define HORIZONTAL_PIXEL 30
  285. #define VERTICAL_PIXEL 50
  286.  
  287. WindowPtr       gHelloWindow;
  288.  
  289. /*************************Main************/
  290.  
  291.  
  292. main()
  293.  
  294. {
  295.  
  296.  
  297.  
  298.  
  299.         ToolBoxInit();
  300.         WindowInit();
  301.         while ( !Button() );
  302.  
  303. }
  304.  
  305.  
  306. /************************************ToolBoxInit */
  307. ToolBoxInit()
  308.  
  309. {
  310.  
  311.         InitGraf( &thePort);
  312.         InitFonts();
  313.         FlushEvents( everyEvent, REMOVE_ALL_EVENTS );
  314.         InitWindows();
  315.         InitMenus();
  316.         TEInit();
  317.         InitDialogs(NIL_POINTER);
  318.         InitCursor();
  319.  
  320. }
  321.  
  322. /***********************WindowInit***************************/
  323. WindowInit()
  324. {
  325.  
  326.  
  327.         gHelloWindow= GetNewWindow( BASE_RES_ID , NIL_POINTER , (WindowPtr)MOVE_TO_FRONT);
  328.         ShowWindow( gHelloWindow);
  329.         SetPort( gHelloWindow);
  330.         MoveTo(HORIZONTAL_PIXEL, VERTICAL_PIXEL );
  331.         DrawString("\pHello, World");
  332.         }
  333.  
  334.         Thanks
  335.  
  336. Clinton R. LeFort
  337.  
  338. >From rmah@panix.com 1 May 94 14:53:51 GMT
  339. Path: ucivax!gateway
  340. From: rmah@panix.com ("Robert S. Mah")
  341. Subject: Re: prototypes & bus error
  342. Message-ID: <9405010753.aa16769@q2.ics.uci.edu>
  343. Content-Type: text/plain; charset="us-ascii"
  344. Mime-Version: 1.0
  345. Newsgroups: fa.think-c
  346. X-Message-ID: <199405011453.AA08894@panix.com>
  347. Approved: usenet@q2.ics.uci.edu
  348. Lines: 35
  349. Date: 1 May 94 14:53:51 GMT
  350.  
  351. At  8:03 AM 5/1/94 +0000, Clinton R Lefort wrote:
  352. >
  353. > I have tried the helpful suggestions of those who responded to my query,
  354. > unfortunately I tried to run this code with the'debugger on' and I stepped
  355. > thru the entire code , but whenit gets to the end of the code where it is
  356. > asked to print "Hello world' I get the bus  error : 0x003FEFF6 at teh
  357. > bottom of the debugger window....this occurs whether I place (WindowPtr)-1)
  358. > (WindowPtr)-1 at rehdefines or at the function call to getHelloWindow:
  359. >
  360. > gHelloWindow= GetNewWindow( BASE_RES_ID , NIL_POINTER ,
  361. >                             (WindowPtr)MOVE_TO_FRONT);
  362. > ShowWindow( gHelloWindow);
  363. > SetPort( gHelloWindow);
  364. > MoveTo(HORIZONTAL_PIXEL, VERTICAL_PIXEL );
  365. > DrawString("\pHello, World");
  366.  
  367. The moveToFront param has nothing to do with your bus error.  Is the window
  368. appearing?  If not, then you're not loading a window, probably because,
  369. either
  370. a) you don't have enough memory available (unlikely) or b) it can't find
  371. the WIND resource.  If b), then this can be caused because 1) the resource
  372. isn't there, 2) its been numbered incorrectly or 3) because you named your
  373. resource file incorrectly.
  374.  
  375. In addition, you should ALWAYS check return values.  Your code is assuming
  376. that the call to GetNewWindow will always succeed.  This is not a valid
  377. assumption.
  378.  
  379. Cheers,
  380. Rob
  381.  
  382. ___________________________________________________________________________
  383. Robert S. Mah  -=-  One Step Beyond  -=-  212-947-6507  -=-  rmah@panix.com
  384.  
  385.  
  386. >From 99shafer@grog.lab.cc.wmich.edu 1 May 94 15:17:49 GMT
  387. Path: ucivax!gateway
  388. From: 99shafer@grog.lab.cc.wmich.edu ("Matthew E. Shafer")
  389. Subject: Re: prototypes & bus error
  390. Message-ID: <9405010817.aa17524@q2.ics.uci.edu>
  391. In-Reply-To: <9405010103.aa21913@q2.ics.uci.edu>
  392. Content-Type: TEXT/PLAIN; charset=US-ASCII
  393. Mime-Version: 1.0
  394. Newsgroups: fa.think-c
  395. X-Message-ID: <Pine.3.07.9405011146.A10930-c100000@grog>
  396. Approved: usenet@q2.ics.uci.edu
  397. Lines: 81
  398. Date: 1 May 94 15:17:49 GMT
  399.  
  400. On 1 May 1994, Clinton R Lefort wrote:
  401. > Hello,
  402. >
  403. > I have tried the helpful suggestions of those who responded to my query,
  404. > unfortunately I tried to run this code with the'debugger on' and I stepped thru
  405. > the entire code , but whenit gets to the end of the code where it is asked to print "Hello world' I get the bus  error : 0x003FEFF6 at teh bottom of the debugger window....this occurs whether I place (WindowPtr)-1) (WindowPtr)-1 at rehdefines or at the f
  406. unction call to getHelloWindow:
  407. >
  408. > gHelloWindow= GetNewWindow( BASE_RES_ID , NIL_POINTER , (WindowPtr)MOVE_TO_FRONT);
  409. >
  410. > Here is the code again, maybe someone else would like to try it, and see if they get teh same response...I am running THINKC 6.0...
  411. >
  412. >
  413.  
  414. [Buggy code deleted]
  415.  
  416. I noticed you had your BASE_RES_ID set to 400. GetNewWindow pulls a WIND
  417. resource that has already been created. Make sure that you used ResEdit
  418. to create the resource and that you set it's ID to 400. You should also
  419. put in some error checking in case the program can't find the resource.
  420. Try this code:
  421.  
  422. #define BASE_RES_ID       400   // assuming resource exists
  423. #define MOVE_TO_FRONT     (WindowPtr)-1L
  424. #define HORIZONTAL_PIXEL  30
  425. #define VERTICAL_PIXEL    50
  426.  
  427. void  ToolBoxInit( void );
  428. void  WindowInit( void );
  429.  
  430. /******** main **********/
  431. void   main( void )
  432. {
  433.     ToolBoxInit();
  434.     WindowInit();
  435.  
  436.     while ( !Button() );
  437. }
  438.  
  439. /******* ToolBoxInit ********/
  440. {
  441.     InitGraf( &thePort );
  442.     InitFonts();
  443.     InitWindows();
  444.     InitMenus();
  445.     TEInit();
  446.     InitDialogs( nil );
  447.     InitCursor();
  448. }
  449.  
  450. /******* WindowInit ********/
  451. {
  452.     WindowPtr  window;   /* use local variables if possible */
  453.  
  454.     window = GetNewWindow( BASE_RES_ID, nil, MOVE_TO_FRONT );
  455.  
  456.     if ( window == nil )
  457.     {
  458.         SysBeep( 10 );  /* can't find resource */
  459.         ExitToShell();
  460.     }
  461.  
  462.     ShowWindow( window );
  463.     SetPort( window );
  464.  
  465.     MoveTo( HORIZONTAL_PIXEL, VERTICAL_PIXEL );
  466.     DrawString( "\pHello, world!" );
  467. }
  468.  
  469. A couple things:
  470. (1) avoid using global variables. It was really no biggie in your
  471.     original code, but it's bad style.
  472. (2) If you use a Toolbox function that relies on resources (such as
  473.     GetNewWindow), make sure that you have already created the resource.
  474.     Name the resource file after your THINK project name. For example,
  475.     My_project.pi.rsrc.
  476. (3) Use error checking. It avoids some crashes.
  477.  
  478. .Matt
  479.  
  480.  
  481. >From clefort@unix1.sncc.lsu.edu 1 May 94 18:39:04 GMT
  482. Path: ucivax!gateway
  483. From: clefort@unix1.sncc.lsu.edu (Clinton R Lefort)
  484. Subject: PlaySound() and buggy code
  485. Message-ID: <9405011139.aa23565@q2.ics.uci.edu>
  486. Newsgroups: fa.think-c
  487. X-Message-ID: <9405011838.AA18580@unix1.sncc.lsu.edu>
  488. Approved: usenet@q2.ics.uci.edu
  489. Lines: 119
  490. Date: 1 May 94 18:39:04 GMT
  491.  
  492.  
  493. Hello,
  494.  
  495. I was lucky to get my 'hello world' program running by placing my resources in the right place, now that that problem has been solved..I got bored , andso I havecreated another resource, but now that it isplaced inthe proper place, I cannot get the SndPlay(mySnd) to function.....
  496.  
  497. The code is all thesame, but I have added the sound.h and a function that plays
  498. a resource  for me.. Wheni rn the debugger I get a syntax error at
  499.  
  500. SndChannel =&SndChannelPtr;
  501.  
  502.  
  503.  
  504. #define kAsync TRUE    //play is asynchronous
  505. #define mySndlID 129  //resource ID of 'snd'
  506. #define BASE_RES_ID     400
  507. #define NIL_POINTER 0L
  508. #define MOVE_TO_FRONT  ((WindowPtr)-1L)
  509. #define REMOVE_ALL_EVENTS 0
  510. #define HORIZONTAL_PIXEL 30
  511. #define VERTICAL_PIXEL 50
  512.  
  513. WindowPtr       gHelloWindow;
  514.  
  515. /*************************Main************/
  516.  
  517. #include <Sound.h>
  518.  
  519.  
  520.  
  521.  
  522. void CallSndPlay(void);
  523.  
  524. void callSndPlay()
  525. {
  526.  
  527. Handle mySndHandle;
  528. ResType snd;
  529. short  rID;
  530. rID = 129;
  531. SndChannel = *SndChannelPtr;
  532. SndChannelPtr mySndChan;
  533. mySndChan = Chan1;
  534. OSErr myErr;
  535.  
  536.  
  537. //prototype for user defined error handling routine
  538. void DoError(OSErr);
  539.  
  540. mySndChan= nil; //Initialize channel pointer fro error checking
  541.  
  542. //Read in 'snd' resource from resource file
  543. mySndHandle = GetResource('snd', mySndID);
  544.  
  545. //check for a nil handle
  546.  
  547.         if(mySndHandle !=nil {
  548.                 myErr = SndPlay(mySndChan, mySndHandle,kAsync);
  549.                 if(myErr)
  550.                 DoError(myErr);
  551.         }
  552.  
  553. }
  554. main()
  555.  
  556. {
  557.  
  558.         //costants
  559.  
  560.  
  561.         ToolBoxInit();
  562.         WindowInit();
  563.         while ( !Button() );
  564.  
  565. }
  566.  
  567.  
  568. /************************************ToolBoxInit */
  569. ToolBoxInit()
  570.  
  571. {
  572.  
  573.         int myFontNumber;
  574.         int myFontSize;
  575.         TextFont(myFontNumber);
  576.         TextSize(myFontSize);
  577.         InitGraf( &thePort);
  578.         InitFonts();
  579.         FlushEvents( everyEvent, REMOVE_ALL_EVENTS );
  580.  
  581.         InitWindows();
  582.         InitMenus();
  583.         TEInit();
  584.         InitDialogs(NIL_POINTER);
  585.         InitCursor();
  586.  
  587. }
  588.  
  589. /***********************WindowInit***************************/
  590. WindowInit()
  591. {
  592.  
  593.  
  594.         gHelloWindow= GetNewWindow( BASE_RES_ID , NIL_POINTER , (WindowPtr)MOVE_TO_FRONT);
  595.         ShowWindow( gHelloWindow);
  596.         SetPort( gHelloWindow);
  597.         MoveTo(HORIZONTAL_PIXEL, VERTICAL_PIXEL );
  598.         TextFont(monaco);
  599.         TextFace(bold);
  600.         TextSize(24);
  601.         DrawString("\pHello, World");
  602.         }
  603.  
  604.  
  605. Does anyone see the obvious that I don't see, other than that I can't program?
  606.  
  607. Thanks,
  608.  
  609. Clinton R. LeFort
  610.  
  611. >From D.Thomas@vthrc.uq.edu.au 1 May 94 22:58:47 GMT
  612. Path: ucivax!gateway
  613. From: D.Thomas@vthrc.uq.edu.au (Danny Thomas)
  614. Subject: Re: PlaySound() and buggy code
  615. X-Sender: thomas@pop3.vthrc.uq.oz.au.
  616. Message-ID: <9405011558.aa02941@q2.ics.uci.edu>
  617. Content-Type: text/plain; charset="us-ascii"
  618. Mime-Version: 1.0
  619. Newsgroups: fa.think-c
  620. X-Message-ID: <199405012258.IAA13669@xroads.vthrc.uq.oz.au>
  621. Approved: usenet@q2.ics.uci.edu
  622. Lines: 29
  623. Date: 1 May 94 22:58:47 GMT
  624.  
  625. starting to use prototypes
  626. > ...
  627. >void CallSndPlay(void);
  628. >
  629.  
  630. the suggestions to check return values for every system call is VERY
  631. worthwhile, particularly when you're learning a system. It WILL save you
  632. from programs mysteriously crashing - at least as long as you print out a
  633. meaningful error message upon an unexpected return value. Of course
  634. there'll be other mysterious crashes and problems...
  635.     Another suggestion is to enable the "require prototypes" option in the
  636. compiler. This is not directed at you, but it amazes me that many popular
  637. programs I build for our unix system, eg sendmail, CAP, LIFE, NetBSD
  638. itself, etc, do not (always) include all header files or prototypes for
  639. local functions. Partly that's because turning on the the compiler warning
  640. options gives so much it's hard to separate the useful from the
  641. not-so-useful. Of course one pass could clear up the S/N to a large degree.
  642. I'm sure many mac programmers follow the same sloppy practice and don't
  643. give the compiler enough assistance to pick up their glaring errors. The
  644. time it takes to include/write prototypes is a tiny fraction of the overall
  645. programming time and they do save much more time overall. Unfortunately,
  646. when THINK C (haven't run with 7 yet) reports a call/declaration prototype
  647. mismatch it does not tell you what type it was given vs what type is
  648. expected.
  649.  
  650. cheers,
  651. Danny Thomas
  652.  
  653.  
  654. >From gurgle@netcom.com 2 May 94 03:40:18 GMT
  655. Path: ucivax!gateway
  656. From: gurgle@netcom.com (Pete Gontier)
  657. Subject: Re: PlaySound() and buggy code
  658. Message-ID: <9405012040.aa13501@q2.ics.uci.edu>
  659. In-Reply-To: <9405011558.aa02941@q2.ics.uci.edu> from "Danny Thomas" at May 1, 94 10:58:47 pm
  660. X-Mailer: ELM [version 2.4 PL23]
  661. Content-Transfer-Encoding: 7bit
  662. Content-Type: text/plain; charset=US-ASCII
  663. Content-Length: 1415
  664. MIME-Version: 1.0
  665. Newsgroups: fa.think-c
  666. X-Message-ID: <199405020341.UAA10133@netcom.com>
  667. Approved: usenet@q2.ics.uci.edu
  668. Lines: 27
  669. Date: 2 May 94 03:40:18 GMT
  670.  
  671. > ...it amazes me that many popular programs I build for our unix
  672. > system, eg sendmail, CAP, LIFE, NetBSD itself, etc, do not (always)
  673. > include all header files or prototypes for local functions. Partly
  674. > that's because turning on the the compiler warning options gives so
  675. > much it's hard to separate the useful from the not-so-useful. Of
  676. > course one pass could clear up the S/N to a large degree.
  677.  
  678. Also, many compilers have ways to control warnings to varying degrees.
  679. Some support command line switches to control sets of warnings or
  680. warning levels or individual warnings. Some have #pragmas which allow
  681. you to control warnings in the code. (I like the former technique
  682. better, because the settings are compiler-specific, and the command line
  683. is compiler-specific anyway.)
  684.  
  685. There's no excuse for not responding to warnings, even if there are
  686. no such controls over granularity. UNIX code gets away with it either
  687. because it's old old code or because it's written by folks who learned
  688. C before ANSI, and since they've been at it so long, they like to think
  689. they know what they are doing better than the compiler does. Sometimes
  690. their code can't even be compiled with prototypes without major changes.
  691. I guess that's something of an excuse for old code, but not for new
  692. code.
  693.  
  694. --
  695.  Pete Gontier, CTO, Integer Poet Software; gurgle@netcom.com
  696.  
  697.  Symantec C++ a "Bjarne Burner"? Yeah, I'd be pretty burned up, too!
  698. >From jum@helios.de 2 May 94 12:29:15 GMT
  699. Path: ucivax!gateway
  700. From: jum@helios.de (Jens-Uwe Mager)
  701. Subject: Re: Vector Tutorial problem
  702. Message-ID: <9405020529.aa16735@q2.ics.uci.edu>
  703. Newsgroups: fa.think-c
  704. X-Message-ID: <9405020813.AA16038@heliosd.helios.de>
  705. Approved: usenet@q2.ics.uci.edu
  706. Lines: 18
  707. Date: 2 May 94 12:29:15 GMT
  708.  
  709.  
  710. >Can someone help me I have a Problem with my Symantec C++
  711. >program. I am trying to run the Vector  Project Tutorial in the User Guide
  712. >It fails I get a link error and these code statements:
  713. >
  714. >     undefined: operator <<(ostream&,vector<char>&)
  715. >     undefined: operator <<(ostream&,vector<myDate>&)
  716. >     undefined: operator <<(ostream&,vector<float>&)
  717. >     undefined: operator <<(ostream&,vector<int>&)
  718.  
  719. I did have the same problem, and found the answer in a c.s.p posting.
  720. There is a difference in template instantiation in 7.0, you have to add
  721. lines like the following to each of the instantion .cp files:
  722.  
  723. #pragma template operator <<(ostream&, vector<char>&)
  724.  
  725. The above line would go into the vector <char>.cp file. You will have
  726. to do that for all the vector <xxx>.cp files.
  727. >From rcs96947@cs.fit.edu 2 May 94 13:24:22 GMT
  728. Path: ucivax!gateway
  729. From: rcs96947@cs.fit.edu (Joshua Ball /ADVISOR Baggs)
  730. Subject: Hypercard 2.2
  731. Message-ID: <9405020624.aa18761@q2.ics.uci.edu>
  732. Newsgroups: fa.think-c
  733. X-Message-ID: <9405021326.AA09871@cs.fit.edu>
  734. Approved: usenet@q2.ics.uci.edu
  735. Lines: 23
  736. Date: 2 May 94 13:24:22 GMT
  737.  
  738. Anyone out there have Hypercard 2.2 they could lend me for a
  739. couple of days.
  740.  
  741. I have been trying to write a program to display sounds and pictures
  742. and do some timing for a psych experiment and have failed miserably.
  743.  
  744. I am attempting to graduate here on saturday and it is due
  745. Thursday so I am reverting back to Hypercard and need to knock it
  746. out.
  747. Sometimes grades are more important than learning=> go figure :-(
  748.  
  749. I have 2.1 but have a book for 2.2.
  750.  
  751. Help a student in desparate (ie graduation depends on it) NEED
  752.  
  753. Thanks,
  754.  
  755. Josh    rcs96947@cs.fit.edu
  756.  
  757. P.S. If you ar one of those who are getting all huffy about stealing
  758. software, believe me, I have no desire to keep this program, just
  759. use it temporarily to run an experiment. I promise I will use my "copy"
  760. of disk doctor to erase it after I am done :-)
  761. >From tooleyc@aol.com 2 May 94 14:31:04 GMT
  762. Path: ucivax!gateway
  763. From: tooleyc@aol.com
  764. Subject: Re: PlaySound() and buggy code
  765. Message-ID: <9405020731.aa21488@q2.ics.uci.edu>
  766. X-Mailer: America Online Mailer
  767. Newsgroups: fa.think-c
  768. X-Message-ID: <9405021030.tn49278@aol.com>
  769. Approved: usenet@q2.ics.uci.edu
  770. Lines: 12
  771. Date: 2 May 94 14:31:04 GMT
  772.  
  773. Two Things:
  774.  
  775. First, it's a 'snd ', not a 'snd' resource, probably why you are crashing -
  776. check the validity of mySndHandle befor calling sndplay.
  777.  
  778. Second, you can use the kasync parameter, but the sound will only play
  779. syncronously unless you create a 'real' sndChannel.
  780.  
  781. Good Luck!
  782. Chris
  783.  
  784. (no dorky poems to follow)
  785. >From Lance.Helsten@m.cc.utah.edu 2 May 94 15:41:22 GMT
  786. Path: ucivax!gateway
  787. From: Lance.Helsten@m.cc.utah.edu (Lance Helsten)
  788. Subject: Re: PlaySound() and buggy code
  789. Message-ID: <9405020841.aa25989@q2.ics.uci.edu>
  790. In-Reply-To: <9405011558.aa02941@q2.ics.uci.edu>
  791. Content-Type: TEXT/PLAIN; charset=US-ASCII
  792. MIME-Version: 1.0
  793. Newsgroups: fa.think-c
  794. X-Message-ID: <Pine.3.07.9405020914.E10427-b100000@u.cc.utah.edu>
  795. Approved: usenet@q2.ics.uci.edu
  796. Lines: 30
  797. Date: 2 May 94 15:41:22 GMT
  798.  
  799. > the suggestions to check return values for every system call is VERY
  800. > worthwhile, particularly when you're learning a system. It WILL save you
  801. > from programs mysteriously crashing - at least as long as you print out a
  802. > meaningful error message upon an unexpected return value. Of course
  803. > there'll be other mysterious crashes and problems...
  804. >     Another suggestion is to enable the "require prototypes" option in the
  805. > compiler. This is not directed at you, but it amazes me that many popular
  806. > programs I build for our unix system, eg sendmail, CAP, LIFE, NetBSD
  807. > itself, etc, do not (always) include all header files or prototypes for
  808. > local functions. Partly that's because turning on the the compiler warning
  809. > options gives so much it's hard to separate the useful from the
  810. > not-so-useful. Of course one pass could clear up the S/N to a large degree.
  811. > I'm sure many mac programmers follow the same sloppy practice and don't
  812. > give the compiler enough assistance to pick up their glaring errors. The
  813. > time it takes to include/write prototypes is a tiny fraction of the overall
  814. > programming time and they do save much more time overall. Unfortunately,
  815. > when THINK C (haven't run with 7 yet) reports a call/declaration prototype
  816. > mismatch it does not tell you what type it was given vs what type is
  817. > expected.
  818. >
  819.  
  820. I agree with Danny. If you want clean code turn on all the warnings your
  821. compiler can give you. Those warnings are common places that programmers
  822. make mistakes with the language. Another hint is to use assert in your
  823. development code, it will help track down bogus pointers and other values
  824. out of range while the system is running and not after the system has crashed.
  825.  
  826. Lance
  827.  
  828.  
  829. >From egriffin@msmail4.hac.com 2 May 94 15:54:15 GMT
  830. Path: ucivax!gateway
  831. From: egriffin@msmail4.hac.com ("Griffin, Ed E")
  832. Subject: Re: PalySound() and buggy code
  833. Message-ID: <9405020854.aa27084@q2.ics.uci.edu>
  834. Newsgroups: fa.think-c
  835. X-Message-ID: <9405021553.AA00661@hac2arpa.hac.com>
  836. Approved: usenet@q2.ics.uci.edu
  837. Lines: 13
  838. Date: 2 May 94 15:54:15 GMT
  839.  
  840. Dear Clinton,
  841.  
  842.      I second and "third" the sentiments of DT and PG on checking returns and
  843. using prototypes.  Turning on the "Require Prototypes" switch in the compiler
  844. has saved me from silly errors countless times.  Prototype checking even
  845. helped me find a small but deadly typo in the first printing of the Mac
  846. Programming Primer vol. 2!
  847.      Furthermore, given that Symantec supplies you with the useful and simple
  848. to use _Prototype Helper_ (in the Utilities folder), there's no excuse for
  849. not using current coding standards even on your older projects.
  850.  
  851.                               Ed Griffin
  852.                               griffin@hac2arpa.hac.com
  853. >From jcaufiel@cln.etc.bc.ca 2 May 94 19:00:17 GMT
  854. Path: ucivax!gateway
  855. From: jcaufiel@cln.etc.bc.ca (Brent Taylor)
  856. Subject: #define's for Fonts Folder
  857. Message-ID: <9405021200.aa11573@q2.ics.uci.edu>
  858. Newsgroups: fa.think-c
  859. X-Message-ID: <9405021904.AA08425@cln.etc.bc.ca>
  860. Approved: usenet@q2.ics.uci.edu
  861. Lines: 24
  862. Date: 2 May 94 19:00:17 GMT
  863.  
  864. I am using TC5 and can't find header files which contain definitions for
  865. the constants kFontsFolderType, kFontsFolderAliasType, and
  866. fontsFolderIconResource.
  867.  
  868. I assume that they are not defined in any of the TC5 header files.  Please
  869. let me know if they are and where.  If they are not, I need to define them
  870. myself.  I make the following assumptions from the 'icl8' and 'fld#'
  871. resources of the System file.
  872.  
  873.         #define kFontsFolderType          'font'
  874.         #define fontsFolderIconResource   -3968
  875.  
  876. I'm not sure if these definitions are correct and I still need a definition
  877. for kFontsFolderAliasType.
  878.  
  879.         #define kFontsFolderAliasType     ??
  880.  
  881. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  882.  if (atFirstYouDontSucceed)
  883.      Try(Internet);
  884.  /* Brent Taylor */
  885. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  886.  
  887.  
  888. >From dh59+@andrew.cmu.edu 2 May 94 21:39:59 GMT
  889. Path: ucivax!gateway
  890. From: dh59+@andrew.cmu.edu (David A Hausladen)
  891. Subject: building code resource
  892. Message-ID: <9405021439.aa21215@q2.ics.uci.edu>
  893. Newsgroups: fa.think-c
  894. X-Message-ID: <UhlL_0W00WBO8AD0cg@andrew.cmu.edu>
  895. Approved: usenet@q2.ics.uci.edu
  896. Lines: 19
  897. Date: 2 May 94 21:39:59 GMT
  898.  
  899. I am part of an academic team trying to build an XFCN for HyperCard.  We
  900. are using Symantec C++ v.6.  The C++ code compiles without error, but
  901. when we try to build a code resource out of it, we get a link failure
  902. with the following solitary message:
  903.     undefined:  _XTOI
  904. when we check link, it tells us that the undefined identifier occurs in
  905. our source file, i.e. not in the libraries in the project.  In our
  906. source file, we have the default file prefix <MacHeaders++> included, as
  907. well as <HyperXCmd.h> and <stdlib.h>.  The libraries included in the
  908. project are HyperXLib, MacTraps, and the source file. We have also tried
  909. including the ANSI-A4++ library.
  910.  
  911. Where is _XTOI defined?  What library should be included in the project
  912. to get a successful link?  Can we skirt the issue entirely?
  913.  
  914. Thanks,
  915. Dave Hausladen
  916. dh59@andrew.cmu.edu
  917.  
  918. >From dh59+@andrew.cmu.edu 2 May 94 23:30:04 GMT
  919. Path: ucivax!gateway
  920. From: dh59+@andrew.cmu.edu (David A Hausladen)
  921. Subject: building code resources
  922. Message-ID: <9405021630.aa28777@q2.ics.uci.edu>
  923. Newsgroups: fa.think-c
  924. X-Message-ID: <AhlMldS00iV1QBD0hO@andrew.cmu.edu>
  925. Approved: usenet@q2.ics.uci.edu
  926. Lines: 22
  927. Date: 2 May 94 23:30:04 GMT
  928.  
  929.  
  930. I am part of an academic team trying to build an XFCN for HyperCard.  We
  931. are using Symantec C++ v.6.  The C++ code compiles without error, but
  932. when we try to build a code resource out of it, we get a link failure
  933. with the following solitary message:
  934.     undefined:  _XTOI
  935. when we check link, it tells us that the undefined identifier occurs in
  936. our source file, i.e. not in the libraries in the project.  In our
  937. source file, we have the default file prefix <MacHeaders++> included, as
  938. well as <HyperXCmd.h> and <stdlib.h>.  The libraries included in the
  939. project are HyperXLib, MacTraps, and the source file. We have also tried
  940. including the ANSI-A4++ library.
  941.  
  942. Where is _XTOI defined?  What library should be included in the project
  943. to get a successful link?  Can we skirt the issue entirely?
  944.  
  945. Thanks,
  946. Dave Hausladen
  947. dh59@andrew.cmu.edu
  948.  
  949.  
  950.  
  951. >From gurgle@netcom.com 3 May 94 03:36:12 GMT
  952. Path: ucivax!gateway
  953. From: gurgle@netcom.com (Pete Gontier)
  954. Subject: Re: building code resources
  955. Message-ID: <9405022036.aa09247@q2.ics.uci.edu>
  956. In-Reply-To: <9405021630.aa28777@q2.ics.uci.edu> from "David A Hausladen" at May 2, 94 11:30:04 pm
  957. X-Mailer: ELM [version 2.4 PL23]
  958. Content-Transfer-Encoding: 7bit
  959. Content-Type: text/plain; charset=US-ASCII
  960. Content-Length: 400
  961. MIME-Version: 1.0
  962. Newsgroups: fa.think-c
  963. X-Message-ID: <199405030337.UAA21925@netcom.com>
  964. Approved: usenet@q2.ics.uci.edu
  965. Lines: 10
  966. Date: 3 May 94 03:36:12 GMT
  967.  
  968. > Where is _XTOI defined? What library should be included in the project
  969. > to get a successful link? Can we skirt the issue entirely?
  970.  
  971. Try "CPlusLib-A4". It will probably require "ANSI-A4++", too.
  972.  
  973. --
  974.  Pete Gontier, CTO, Integer Poet Software; gurgle@netcom.com
  975.  
  976.  "The human race will decree from time to time: 'There is something at
  977.  which it is absolutely forbidden to laugh.'" -- Nietzche on C++
  978. >From jcaufiel@cln.etc.bc.ca 3 May 94 15:30:32 GMT
  979. Path: ucivax!gateway
  980. From: jcaufiel@cln.etc.bc.ca (Jannice Caufield)
  981. Subject: Floppies vs the Desktop Manager
  982. Message-ID: <9405030830.aa14934@q2.ics.uci.edu>
  983. Newsgroups: fa.think-c
  984. X-Message-ID: <9405031534.AA00684@cln.etc.bc.ca>
  985. Approved: usenet@q2.ics.uci.edu
  986. Lines: 36
  987. Date: 3 May 94 15:30:32 GMT
  988. Fro: jcaufiel@cln.etc.bc.ca (Brent Taylor)
  989.  
  990. As I understand IM6, the Finder does NOT maintain a desktop database for
  991. volumes with capacity less than 2 MB (eg. floppies).  Therefore, I can't
  992. use the Desktop Manager routines on these volumes.  Doesnw how to
  993. retrieve Desktop information (icons, comments, etc) from thume?
  994.  
  995. Relevant portions of IM6 text follow:
  996.  
  997. /******************************* IM6, p9.45-46 ********************************/
  998.  
  999. "The Finder maintains a desktop database for each volume with a capacity
  1000. greater than 2 MB.  For most volumes, such as hard disks, the database is
  1001. stored on the volume itself.  For read-only volumes--such as some compact
  1002. dtha don't contain their own desktop database, the Desktop Manager
  1003. creates it and stores it in the System Folder of the boot drive....
  1004.  
  1005. "For compatibility with older versions of system software, the Finder keeps
  1006. the information for ejectable volumes with a capacity smaller than 2 MB in
  1007. a resource file instead of a database....
  1008.  
  1009. "In earlier versions of system software, Finder information for each volume
  1010. was stored in the volume's Desktop file, a resource file created and used
  1011. by the Finder and invisible to the user.  This strategy meets the needs of
  1012. a single-user system with reasonably small volumes.  The Desktop file is
  1013. still used on ejectable volumes with a capacity less than 2 MB so that
  1014. these floppy disks can be shared with Macintosh computers running earlier
  1015. versions of system software.  (Note, however, that resources can't be
  1016. shared.  Since the Finder is always running in system software version 7.0,
  1017. it keeps each floppy disk's Desktop file open, so your application can't
  1018. read or write it.)"
  1019. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1020.  if (atFirstYouDontSucceed)
  1021.      Try(Internet);
  1022.  /* Brent Taylor */
  1023. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1024.  
  1025.  
  1026. >From reaper@jhunix.hcf.jhu.edu 3 May 94 15:39:11 GMT
  1027. Path: ucivax!gateway
  1028. From: reaper@jhunix.hcf.jhu.edu (John Grimes)
  1029. Subject: Show a Moving Region
  1030. Message-ID: <9405030839.aa15295@q2.ics.uci.edu>
  1031. Content-Type: TEXT/PLAIN; charset=US-ASCII
  1032. MIME-Version: 1.0
  1033. Newsgroups: fa.think-c
  1034. X-Message-ID: <Pine.3.89.9405031143.B4794-0100000@jhunix.hcf.jhu.edu>
  1035. Approved: usenet@q2.ics.uci.edu
  1036. Lines: 23
  1037. Date: 3 May 94 15:39:11 GMT
  1038.  
  1039.  
  1040.         I was wondering if anyone could help me on my latest difficulty.
  1041. Anyway I have picts (usually defines as controls but sometimes just drawn
  1042. on the screen) and I would like to show them moving from point A to B.
  1043. Sometimes I can use draggray region to do this (when working with the
  1044. mouse but thats not always the case).  Also this only shows the gray not
  1045. the pict.  But more importantly I would like to be able to move the pict
  1046. from point A to B and make it possible for the user to see the movement.
  1047. Not just having the pict show up at a new place.  I appreciate any help.
  1048.                                                 Thanks,
  1049.                                                 John Grimes
  1050.  
  1051. ******************************************************************************
  1052.         This was no time for play
  1053.         This was no time for fun
  1054.         This was no time for games
  1055.         There was work to be done.
  1056.                         Cat in the Hat Comes Back-Dr. Seuss
  1057. ******************************************************************************
  1058.                                         John Grimes
  1059.                                         reaper@jhunix
  1060.                                         HAC Consultant
  1061.  
  1062. >From omalley@umich.edu 3 May 94 17:19:05 GMT
  1063. Path: ucivax!gateway
  1064. From: omalley@umich.edu (Kevin O'Malley)
  1065. Subject: SCSIGet() crashes system
  1066. Message-ID: <9405031019.aa21217@q2.ics.uci.edu>
  1067. Content-Type: TEXT/plain; charset=US-ASCII
  1068. Newsgroups: fa.think-c
  1069. X-Message-ID: <Mailstrom.1.04.150.15089.omalley@o.imap.itd.umich.edu>
  1070. Approved: usenet@q2.ics.uci.edu
  1071. Lines: 11
  1072. Date: 3 May 94 17:19:05 GMT
  1073.  
  1074.  
  1075. Under Symantec 7.0 (as well as 5.0/6.0.1) the call to SCSIGet() crashes our
  1076. machine. Symantec tech. support, after trying it, also crashed their machine.
  1077. They said to contact Apple for more documentation on the SCSI Manager. Has
  1078. anyone seen this problem, or know a solution or workaround?
  1079.  
  1080. Kevin - omalley@umich.edu
  1081.  
  1082.  
  1083.  
  1084.  
  1085. >From jcaufiel@cln.etc.bc.ca 3 May 94 18:03:47 GMT
  1086. Path: ucivax!gateway
  1087. From: jcaufiel@cln.etc.bc.ca (Brent Taylor)
  1088. Subject: Error ID -410
  1089. Message-ID: <9405031103.aa23877@q2.ics.uci.edu>
  1090. Newsgroups: fa.think-c
  1091. X-Message-ID: <9405031808.AA14683@cln.etc.bc.ca>
  1092. Approved: usenet@q2.ics.uci.edu
  1093. Lines: 13
  1094. Date: 3 May 94 18:03:47 GMT
  1095.  
  1096. I just got error -410 while trying to obtain desktop database information
  1097. from a CD volume.  My documentation (IM1-6) does not contain a description
  1098. for this error ID.
  1099.  
  1100. Does anybody know what it is?
  1101.  
  1102. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1103.  if (atFirstYouDontSucceed)
  1104.      Try(Internet);
  1105.  /* Brent Taylor */
  1106. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1107.  
  1108.  
  1109. >From gurgle@netcom.com 3 May 94 19:59:28 GMT
  1110. Path: ucivax!gateway
  1111. From: gurgle@netcom.com (Pete Gontier)
  1112. Subject: Re: Floppies vs the Desktop Manager
  1113. Message-ID: <9405031259.aa01819@q2.ics.uci.edu>
  1114. In-Reply-To: <9405030830.aa14934@q2.ics.uci.edu> from "Jannice Caufield" at May 3, 94 03:30:32 pm
  1115. X-Mailer: ELM [version 2.4 PL23]
  1116. Content-Transfer-Encoding: 7bit
  1117. Content-Type: text/plain; charset=US-ASCII
  1118. Content-Length: 842
  1119. MIME-Version: 1.0
  1120. Newsgroups: fa.think-c
  1121. X-Message-ID: <199405031959.MAA13001@netcom.com>
  1122. Approved: usenet@q2.ics.uci.edu
  1123. Lines: 17
  1124. Date: 3 May 94 19:59:28 GMT
  1125.  
  1126. > As I understand IM6, the Finder does NOT maintain a desktop database
  1127. > for volumes with capacity less than 2 MB (eg. floppies). Therefore, I
  1128. > can't use the Desktop Manager routines on these volumes. Doesnw how to
  1129. > retrieve Desktop information (icons, comments, etc) from thume?
  1130.  
  1131. Finder does maintain a desktop database, but it's not in the same
  1132. format. It's a System 6 era resource file called "Desktop" (big
  1133. surprise). Its format was never documented, and those who wanted to read
  1134. it had to reverse engineer it. On the good side of the undocumentedness,
  1135. though, is that it's probable the format will never again change in a
  1136. way that would break code which reads a file generated by a System 6
  1137. Finder.
  1138.  
  1139. --
  1140.  Pete Gontier, CTO, Integer Poet Software; gurgle@netcom.com
  1141.  
  1142.  Symantec C++ a "Bjarne Burner"? Yeah, I'd be pretty burned up, too!
  1143. >From P30WCC1%NIU.BITNET@uicvm.uic.edu 3 May 94 21:00:44 GMT
  1144. Path: ucivax!gateway
  1145. From: P30WCC1%NIU.BITNET@uicvm.uic.edu (Wes Covalt)
  1146. Subject: Mini-spreadsheet
  1147. Message-ID: <9405031400.aa05559@q2.ics.uci.edu>
  1148. Newsgroups: fa.think-c
  1149. X-Message-ID: <9405031400.aa05559@q2.ics.uci.edu>
  1150. Approved: usenet@q2.ics.uci.edu
  1151. Lines: 9
  1152. Date: 3 May 94 21:00:44 GMT
  1153.  
  1154. I want to build a mini-spreadsheet for entering data for statistical
  1155. analysis.  Can anyone suggest a book that gives sample C code
  1156. for the procedures needed for such an application?  (I know I
  1157. _should_ learn C++, but I want to be secure in the basics first.)
  1158.  
  1159. Thanks
  1160. Wes
  1161. Northern Illinois University
  1162. P30WCC1@MVS.CSO.NIU.EDU
  1163. >From kalash@starnine.com 4 May 94 00:20:50 GMT
  1164. Path: ucivax!gateway
  1165. From: kalash@starnine.com (Joe Kalash)
  1166. Subject: Symantec c and applescript?
  1167. Message-ID: <9405031720.aa18581@q2.ics.uci.edu>
  1168. X-Mailer: Mail*Link SMTP/QM 3.0.0b6
  1169. Newsgroups: fa.think-c
  1170. X-Message-ID: <n1444136841.8003@quickmail.starnine.com>
  1171. Approved: usenet@q2.ics.uci.edu
  1172. Lines: 29
  1173. Date: 4 May 94 00:20:50 GMT
  1174.  
  1175.                        Subject:                               Time:3:50 PM
  1176.   OFFICE MEMO          Symantec c and applescript?            Date:5/3/94
  1177.  
  1178. I am trying to automate the build of several Think-C projects (libraries,
  1179. applications, code resources) from within MPW. What I would like to do is ask
  1180. the Project Manager to check a project (a Make with "use disk"), and then (if
  1181. neccesary) build the resulting object.
  1182.  
  1183. I can open and build a think project w/o problem from an applescript
  1184. controlling the think project manager.  My dilemma is determining whether the
  1185. build failed or succeeded.  Has anyone figured out a way?  I do not seem to
  1186. be able to look for the presence of the 'compile errors' window or anything
  1187. similar.  Perhaps I could 'poke' some think c structure (undocumented) to
  1188. determine whether a project needs building or not but I'm unsure as to where
  1189. to look.  Any assistance would be greatly appreciated.
  1190.  
  1191. While I'm at it, has anyone figured a way of passing a document name into an
  1192. applescript (other than by drag and dropping)?
  1193.  
  1194. Is there some source for think project manager controlling scripts?
  1195.  
  1196. Anyone w/experience writing an mpw tool to call applescript?
  1197.  
  1198. Thanks for the help.
  1199.  
  1200. Joe Kalash
  1201. StarNine Technologies, Inc.
  1202. kalash@starnine.com
  1203.  
  1204. >From abarne1@gl.umbc.edu 4 May 94 12:49:38 GMT
  1205. Path: ucivax!gateway
  1206. From: abarne1@gl.umbc.edu (barnett aaron)
  1207. Subject: getting desk pattern
  1208. Message-ID: <9405040549.aa24003@q2.ics.uci.edu>
  1209. Newsgroups: fa.think-c
  1210. X-Message-ID: <199405041249.IAA27399@umbc9.umbc.edu>
  1211. Approved: usenet@q2.ics.uci.edu
  1212. Lines: 7
  1213. Date: 4 May 94 12:49:38 GMT
  1214.  
  1215.  
  1216. how can i get a handle to the desktop pattern for use in an application?
  1217.  
  1218.  
  1219. \.
  1220. aaron <abarne1@gl.umbc.edu>
  1221. "It's a safety mechanism, the mind shuts off."
  1222. >From chrism@corp.cirrus.com 4 May 94 17:09:17 GMT
  1223. Path: ucivax!gateway
  1224. From: chrism@corp.cirrus.com (Chris Metcalfe)
  1225. Subject: Re:  Mini-spreadsheet
  1226. Message-ID: <9405041009.aa04804@q2.ics.uci.edu>
  1227. Newsgroups: fa.think-c
  1228. X-Message-ID: <9405041708.AA28720@tango.corp.cirrus.com>
  1229. Approved: usenet@q2.ics.uci.edu
  1230. Lines: 10
  1231. Date: 4 May 94 17:09:17 GMT
  1232.  
  1233. The book "Easy Object Programming for the Macintosh" has an exellent
  1234. example of a spreadsheet, annotation, and plotting package called
  1235. "Ensemble."  It compiles on Think C 5.0, and uses AppMaker 1.5 to
  1236. edit the UI.  However, since all the source files are given for each
  1237. stage of the development, you don't really need AppMaker to hack on
  1238. the final version of the program.  (Although it is a worthwhile
  1239. purchase.)
  1240.  
  1241. -- Chris Metcalfe
  1242.  
  1243. >From jcaufiel@cln.etc.bc.ca 4 May 94 19:16:54 GMT
  1244. Path: ucivax!gateway
  1245. From: jcaufiel@cln.etc.bc.ca (Brent Taylor)
  1246. Subject: Re: Error ID -410
  1247. Message-ID: <9405041216.aa12853@q2.ics.uci.edu>
  1248. Newsgroups: fa.think-c
  1249. X-Message-ID: <9405041920.AA16328@cln.etc.bc.ca>
  1250. Approved: usenet@q2.ics.uci.edu
  1251. Lines: 20
  1252. Date: 4 May 94 19:16:54 GMT
  1253.  
  1254. In a previous message, I said:
  1255. >I just got error -410 while trying to obtain desktop database information from
  1256. >>a CD volume.  My documentation (IM1-6) does not contain a description for
  1257. >this >error ID.
  1258. >
  1259. >Does anybody know what it is?
  1260.  
  1261. To be more specific, the error resulted from a PBDTGetPath() call on a CD.
  1262. This call seems to work with most CD's, however, it failed on a particular
  1263. CD.  I'm guessing that perhaps the CD lacks it's own desktop database, but
  1264. I can't really be certain until I learn what error -410 really means.  I
  1265. would appreciate any help on this one.
  1266.  
  1267. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1268.  if (atFirstYouDontSucceed)
  1269.      Try(Internet);
  1270.  /* Brent Taylor */
  1271. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1272.  
  1273.  
  1274. >From gregoryss@aol.com 4 May 94 21:53:31 GMT
  1275. Path: ucivax!gateway
  1276. From: gregoryss@aol.com
  1277. Subject: Re: Floppies vs the Desktop Manager
  1278. Message-ID: <9405041453.aa22579@q2.ics.uci.edu>
  1279. X-Mailer: America Online Mailer
  1280. Newsgroups: fa.think-c
  1281. X-Message-ID: <9405041753.tn149420@aol.com>
  1282. Approved: usenet@q2.ics.uci.edu
  1283. Lines: 20
  1284. Date: 4 May 94 21:53:31 GMT
  1285.  
  1286. >> As I understand IM6, the Finder does NOT maintain a desktop database
  1287. >> for volumes with capacity less than 2 MB (eg. floppies). Therefore, I
  1288. >> can't use the Desktop Manager routines on these volumes. Doesnw how to
  1289. >> retrieve Desktop information (icons, comments, etc) from thume?
  1290.  
  1291. >Finder does maintain a desktop database, but it's not in the same
  1292. >format. It's a System 6 era resource file called "Desktop" (big
  1293. >surprise). Its format was never documentedx
  1294.  
  1295. The desktop file and the desktop database are two different things. The
  1296. desktop FILE (called "Desktop" in sys. 6 and I believe "Desktop DF" in sys.
  1297. 7) has been a part of the Macintosh at lease since HFS has been around. The
  1298. desktop DATABASE is different. Its sole purpose is to allow the volume to be
  1299. shared. Since the desktop file cannot be shared (because it's a resource
  1300. file), there is a separate file called the "Desktop DB" which stores the same
  1301. information as the file, is updated when necessary, but is only read when the
  1302. volume is mounted. The desktop database is also available to applications.
  1303.  
  1304. Greg Scherrer
  1305. -gregoryss@aol.com-
  1306. >From jerry@hipark.austin.isd.tenet.edu 5 May 94 03:01:27 GMT
  1307. Path: ucivax!gateway
  1308. From: jerry@hipark.austin.isd.tenet.edu (Jerry Gatlin)
  1309. Subject: Re: getting desk pattern
  1310. X-Sender: jerry@hipark.austin.isd.tenet.edu (Unverified)
  1311. Message-ID: <9405042001.aa05927@q2.ics.uci.edu>
  1312. Content-Type: text/plain; charset="us-ascii"
  1313. Mime-Version: 1.0
  1314. Newsgroups: fa.think-c
  1315. X-Message-ID: <9405050244.AA10470@hipark>
  1316. Approved: usenet@q2.ics.uci.edu
  1317. Lines: 40
  1318. Date: 5 May 94 03:01:27 GMT
  1319.  
  1320. >how can i get a handle to the desktop pattern for use in an application?
  1321. >
  1322.  
  1323. This is a real quick and dirty but here goes. I haven't done any error
  1324. checking, etc. so please keep this in mind when really coding it. First, if
  1325. you want the B&W Desktop pattern use the first example. If you have color,
  1326. use the second. Make sure you include LowMem.h. These routines worked fine
  1327. for me although this was my first time trying to do this so I don't claim
  1328. to be an expert. If anyone else has a better way of doing this speak up.
  1329.  
  1330. Jerry
  1331.  
  1332.  
  1333. Pattern                 thePat;
  1334. Rect                    theRect;
  1335. PixPatHandle            thePPat;
  1336.  
  1337. /* B&W example */
  1338.  
  1339. LMGetDeskPattern(&thePat);
  1340. SetRect( &theRect, 100,100, 200,200 );
  1341. FrameRect( &theRect);                   /* frame the area */
  1342. InsetRect( &theRect, 1,1);              /* don't overwrite the frame */
  1343. FillRect( &theRect, &thePat);           /* fill with B&W desktop pattern */
  1344.  
  1345. /* Color example */
  1346.  
  1347. thePPat = LMGetDeskCPat();
  1348. SetRect( &theRect, 200,200, 300,300 );
  1349. FrameRect( &theRect);                   /* frame the area */
  1350. InsetRect( &theRect, 1,1);              /* don't overwrite the frame */
  1351. FillCRect( &theRect, thePPat);          /* fill with color desktop pattern */
  1352.  
  1353.  
  1354. ____________________________________________________________________
  1355. Jerry Gatlin                       jerry@hipark.austin.isd.tenet.edu
  1356. Hill Country Softworks (my other life)                    Austin, TX
  1357. ____________________________________________________________________
  1358.  
  1359.  
  1360. >From pindar3@cix.compulink.co.uk 5 May 94 09:58:05 GMT
  1361. Path: ucivax!gateway
  1362. From: pindar3@cix.compulink.co.uk (Pindar Infotek Ltd)
  1363. Subject: Getting a filename in a fil
  1364. Message-ID: <9405050258.aa17437@q2.ics.uci.edu>
  1365. Newsgroups: fa.think-c
  1366. Reply-To: pindar3@cix.compulink.co.uk
  1367. X-Message-ID: <memo.40455@cix.compulink.co.uk>
  1368. Approved: usenet@q2.ics.uci.edu
  1369. Lines: 38
  1370. Date: 5 May 94 09:58:05 GMT
  1371.  
  1372.  
  1373. >From Pindar user Ian McCall
  1374.  
  1375. Subject: _Getting a filename in a file filter
  1376. I'm writing a CustomGetFile filter that depends on the file's name
  1377. for its result. This filter takes the ParamBlkPtr it's passed and
  1378. then does a PBGetFInfo. Despite the fact the ParmBlkPtr was passed
  1379. over by CustomGetFile, I then get an OSErr of -43 (fnfErr).
  1380.  
  1381. Can anyone tell me what I'm doing wrong? The code's below.
  1382.  
  1383.  
  1384.  
  1385. pascal Boolean ListFileFilter(ParmBlkPtr fileDetails, void
  1386. *dummyData)
  1387. {
  1388.    Str255   fileName;
  1389.    OSErr    theResult;
  1390.  
  1391.  
  1392.    fileDetails->fileParam.ioCompletion = NULL;
  1393.    fileDetails->fileParam.ioFDirIndex  = 0;
  1394.    fileDetails->fileParam.ioFVersNum   = 0;
  1395.    fileDetails->fileParam.ioNamePtr    = fileName;
  1396.    theResult = PBGetFInfo(fileDetails, FALSE);
  1397.  
  1398.    if(theResult == noErr)
  1399.       return(IsListFile(fileName));
  1400.    else
  1401.       return(TRUE);
  1402. }
  1403.  
  1404.  
  1405.  
  1406. ---
  1407. Please make 'Attn:<space>Ian McCall' the first line of your reply
  1408. (not the subject) to ensure automatic forwarding to the correct
  1409. Pindar user.
  1410. >From MARKD@leva.leeds.ac.uk 5 May 94 12:10:23 GMT
  1411. Path: ucivax!gateway
  1412. From: MARKD@leva.leeds.ac.uk ("Mark Davies, Caddetc, (44) 532 305005" )
  1413. Subject: Help
  1414. Via: uk.ac.leeds.icf.leva; Thu, 5 May 1994 12:22:01 +0100
  1415. Message-ID: <9405050510.aa03846@q2.ics.uci.edu>
  1416. Newsgroups: fa.think-c
  1417. X-Message-ID: <9405050510.aa03846@q2.ics.uci.edu>
  1418. Approved: usenet@q2.ics.uci.edu
  1419. Lines: 38
  1420. Date: 5 May 94 12:10:23 GMT
  1421.  
  1422. Help,
  1423.  
  1424. I know this is not anything to do with Mac programming, but my Mac is dying.
  1425.  
  1426. Last night it stopped responding, I was debugging some code and it stopped.
  1427. I rebooted it, but it has not come alive again.
  1428.  
  1429. What happens.
  1430.  
  1431. Press Reset.
  1432. Smiley Mac comes on
  1433. Runs INITS
  1434. Loads Finder
  1435. Then it stops, before it can display the desktop, the cursor alternates between
  1436. the arrow and the watch, this is far as it gets.
  1437.  
  1438. Things I've tried
  1439.  
  1440. Leaving it of overnight
  1441.  
  1442. Rebooting with Disk Utilities :- This runs into the same problem as above
  1443.  
  1444. Rebuilding Desk top :- This runs into the same problem
  1445.  
  1446. I have reinstalled System 7.1 and after restart I just get the same problem.
  1447.  
  1448. It would seem the hard drive is knackered, but I'm at the end of my meagre
  1449. mac skills.
  1450.  
  1451. Any help would be appreciated thanks,
  1452.  
  1453. BTW
  1454.  
  1455. Its a Quadra 800 running System 7.1, it has 28 meg of ram and 1/2 G of HD.
  1456.  
  1457. Mark Davies
  1458. Caddetc
  1459. UK
  1460. >From gurgle@netcom.com 5 May 94 17:19:40 GMT
  1461. Path: ucivax!gateway
  1462. From: gurgle@netcom.com (Pete Gontier)
  1463. Subject: Re: Getting a filename in a fil
  1464. Message-ID: <9405051019.aa15387@q2.ics.uci.edu>
  1465. In-Reply-To: <9405050258.aa17437@q2.ics.uci.edu> from "Pindar Infotek Ltd" at May 5, 94 09:58:05 am
  1466. X-Mailer: ELM [version 2.4 PL23]
  1467. Content-Transfer-Encoding: 7bit
  1468. Content-Type: text/plain; charset=US-ASCII
  1469. Content-Length: 2969
  1470. MIME-Version: 1.0
  1471. Newsgroups: fa.think-c
  1472. X-Message-ID: <199405051720.KAA09510@netcom.com>
  1473. Approved: usenet@q2.ics.uci.edu
  1474. Lines: 67
  1475. Date: 5 May 94 17:19:40 GMT
  1476.  
  1477. Attn: Ian McCall
  1478.  
  1479. > I'm writing a CustomGetFile filter that depends on the file's name
  1480. > for its result. This filter takes the ParamBlkPtr it's passed and
  1481. > then does a PBGetFInfo. Despite the fact the ParmBlkPtr was passed
  1482. > over by CustomGetFile, I then get an OSErr of -43 (fnfErr).
  1483. > Can anyone tell me what I'm doing wrong? The code's below.
  1484.  
  1485. I can try to tell you what you are doing wrong, but my first reaction
  1486. is that you are doing something you don't need to do. The parameter
  1487. block to which you are passed a pointer has already been filled out on
  1488. your behalf by the Standard File package. You don't need to fill it out
  1489. again. 'fileDetails->fileParam.ioNamePtr' already points to the filename
  1490. in which you are interested. Your entire filter function could look
  1491. like this:
  1492.  
  1493. pascal Boolean ListFileFilter (ParmBlkPtr fileDetails, void *dummyData)
  1494. {
  1495.         return IsListFile (fileDetails->fileParam.ioNamePtr);
  1496. }
  1497.  
  1498. However, it's possible to assume that you edited your code for posting
  1499. and it no longer does what you really want it to do, so I will attempt
  1500. to look at it anyway.
  1501.  
  1502. > pascal Boolean ListFileFilter(ParmBlkPtr fileDetails, void *dummyData)
  1503. > {
  1504. >    Str255   fileName;
  1505. >    OSErr    theResult;
  1506. >
  1507. >    fileDetails->fileParam.ioCompletion = NULL;
  1508. >    fileDetails->fileParam.ioFDirIndex  = 0;
  1509. >    fileDetails->fileParam.ioFVersNum   = 0;
  1510. >    fileDetails->fileParam.ioNamePtr    = fileName;
  1511. >    theResult = PBGetFInfo(fileDetails, FALSE);
  1512. >
  1513. >    if(theResult == noErr)
  1514. >       return(IsListFile(fileName));
  1515. >    else
  1516. >       return(TRUE);
  1517. > }
  1518.  
  1519. The data you are passing to 'PBGetFInfo' has not been fully initialized.
  1520. When you put 0 in 'fileDetails->fileParam.ioFDirIndex', you are telling
  1521. 'PBGetFInfo' that it will be able to find a pointer to the name of the
  1522. file in which you are interested in 'fileDetails->fileParam.ioNamePtr'.
  1523. Although you have set 'fileDetails->fileParam.ioNamePtr' to point
  1524. to a sufficiently (indeed, maximally) sized buffer, you have not
  1525. put a filename into that buffer. 'PBGetFInfo' thus has insufficient
  1526. information to get info on the file in which you are interested.
  1527. In fact, if you are attempting to obtain the filename, setting
  1528. 'fileDetails->fileParam.ioFDirIndex' to 0 will not help you, because you
  1529. then need the filename in order to obtain the filename! :-)
  1530.  
  1531. Another note: you are getting a "file not found" error as opposed to a
  1532. "volume not found" error because the Standard File package, as I said
  1533. above, has already filled in the parameter block on your behalf. Your
  1534. code forgets to set 'fileDetails->fileParam.ioVRefNum', but this field
  1535. has already been set by the Standard File package, so you get "file
  1536. not found" instead of the "volume not found" message which would be
  1537. likely if 'fileDetails->fileParam.ioVRefNum' contained the usual stack
  1538. or newly-allocated-heap garbage data.
  1539.  
  1540. --
  1541.  Pete Gontier, CTO, Integer Poet Software; gurgle@netcom.com
  1542.  
  1543.  Symantec C++ a "Bjarne Burner"? Yeah, I'd be pretty burned up, too!
  1544. >From gomolld@aol.com 5 May 94 17:32:24 GMT
  1545. Path: ucivax!gateway
  1546. From: gomolld@aol.com
  1547. Subject: Re: Help
  1548. Message-ID: <9405051032.aa16021@q2.ics.uci.edu>
  1549. X-Mailer: America Online Mailer
  1550. Newsgroups: fa.think-c
  1551. X-Message-ID: <9405051332.tn183254@aol.com>
  1552. Approved: usenet@q2.ics.uci.edu
  1553. Lines: 7
  1554. Date: 5 May 94 17:32:24 GMT
  1555.  
  1556. Try zapping your p-ram (Hold dowm CMD - OPT - P - R on sys 7 machines) on
  1557. restart.  When you hear it restart you can let go of the keys.  You can also
  1558. try trashing your finder prefs.  If that does not work, try booting with
  1559. extentions off.  If it boots without extentions, it is some kind of init
  1560. problem.
  1561.  
  1562. -GomollD
  1563. >From jerry@hipark.austin.isd.tenet.edu 5 May 94 19:23:08 GMT
  1564. Path: ucivax!gateway
  1565. From: jerry@hipark.austin.isd.tenet.edu (Jerry Gatlin)
  1566. Subject: Re: getting desk pattern
  1567. Message-ID: <9405051223.aa21597@q2.ics.uci.edu>
  1568. Content-Type: text/plain; charset="us-ascii"
  1569. Mime-Version: 1.0
  1570. Newsgroups: fa.think-c
  1571. X-Message-ID: <9405051913.AA12776@hipark>
  1572. Approved: usenet@q2.ics.uci.edu
  1573. Lines: 35
  1574. Date: 5 May 94 19:23:08 GMT
  1575.  
  1576. >Jerry, do you know something I don't?  I can't find (in THINK Reference
  1577. >anyway) any record of LMGetDeskPattern() or LMGetDeskCPat().  Are these
  1578. >utility functions you wrote, am I just missing them, or do you access to
  1579. >*secrets*.  :-)
  1580. >
  1581. >                                                just mike
  1582.  
  1583. Mike,
  1584.  
  1585. Funny you should ask. Actually, LowMem.h is in Apple's new Universal
  1586. Headers. These routines are now the preferred way of accessing any of
  1587. Apple's low memory globals. I guess I'm so used to them now, I forget that
  1588. a lot of folks aren't using them yet. I'm coding exclusively in CodeWarrior
  1589. now. These replace having to use the globals defined in SysEqu.h. And no,
  1590. they aren't defined in Think Reference. ARGH!
  1591.  
  1592. I looked around in SysEqu for the LowMem equivalants and only came up with:
  1593.  
  1594.  DeskPattern = 0xA3C,                   /*[GLOBAL VAR] Pattern with which
  1595. desktop is painted (8 bytes)
  1596.  
  1597. which I assume corresponds to the B&W DeskPat only. I don't know how you
  1598. might access the color PixPatHandle of the color desktop pattern. Any clues
  1599. anyone??
  1600.  
  1601. Thanks for catching my oversight!
  1602.  
  1603. Jerry
  1604.  
  1605. ____________________________________________________________________
  1606. Jerry Gatlin                       jerry@hipark.austin.isd.tenet.edu
  1607. Hill Country Softworks (my other life)                    Austin, TX
  1608. ____________________________________________________________________
  1609.  
  1610.  
  1611. >From LIZARD%PLEARN.BITNET@searn.sunet.se 5 May 94 19:50:41 GMT
  1612. Path: ucivax!gateway
  1613. From: LIZARD%PLEARN.BITNET@searn.sunet.se (Tim Schaffer)
  1614. Subject: File Structures
  1615. Message-ID: <9405051250.aa22974@q2.ics.uci.edu>
  1616. Newsgroups: fa.think-c
  1617. X-Message-ID: <9405051250.aa22974@q2.ics.uci.edu>
  1618. Approved: usenet@q2.ics.uci.edu
  1619. Lines: 14
  1620. Date: 5 May 94 19:50:41 GMT
  1621.  
  1622. Does anyone have any advice (even very basic - I'm in poland and
  1623. it's rather difficult for me to get any mac programming books here)
  1624. on how to store record and field type information in a file?  Do
  1625. I basically have to scan through the whole file to get some basic
  1626. identifying info on each record, even if I don't want to read in
  1627. the whole record?  Is there any way to encode jumping points for each
  1628. record at the beginning of each file?  (I know that this is somewhat
  1629. of an advanced question, but although I've programmed fairly significantly
  1630. (though not in C), I haven't really done much actual writing to files
  1631. (the file intensive programs I've written have been languages that
  1632. were specifically designed to accesss database files) and have no
  1633. real idea of how different sorts of files are stored on the mac.
  1634. Thanks,
  1635. Tim
  1636. >From rmah@panix.com 6 May 94 03:40:35 GMT
  1637. Path: ucivax!gateway
  1638. From: rmah@panix.com ("Robert S. Mah")
  1639. Subject: Re: File Structures
  1640. Message-ID: <9405052040.aa15329@q2.ics.uci.edu>
  1641. Content-Type: text/plain; charset="us-ascii"
  1642. Mime-Version: 1.0
  1643. Newsgroups: fa.think-c
  1644. X-Message-ID: <199405060340.AA09879@panix.com>
  1645. Approved: usenet@q2.ics.uci.edu
  1646. Lines: 42
  1647. Date: 6 May 94 03:40:35 GMT
  1648.  
  1649. At  7:50 PM 5/5/94 +0000, Tim Schaffer wrote:
  1650. > [...]
  1651. > on how to store record and field type information in a file?  Do
  1652. > I basically have to scan through the whole file to get some basic
  1653. > identifying info on each record, even if I don't want to read in
  1654. > the whole record?  Is there any way to encode jumping points for each
  1655. > record at the beginning of each file?  (I know that this is somewhat
  1656. > of an advanced question, but although I've programmed fairly significantly
  1657. > (though not in C), I haven't really done much actual writing to files
  1658. > (the file intensive programs I've written have been languages that
  1659. > were specifically designed to accesss database files) and have no
  1660. > real idea of how different sorts of files are stored on the mac.
  1661.  
  1662. Think of it this way, the software/languages you used to do database
  1663. work were probably written in C.  Therefore, with some sweat, you'll
  1664. be able to duplicate anything you've seen before :-)  Of course, it
  1665. is easier to build on someone else's work.
  1666.  
  1667. What I'm trying to say is that you'll either have to:
  1668.    1. Find a record oriented or B-Tree database package for C.
  1669. or
  1670.    2. Write your own.
  1671.  
  1672. I suggest looking for an appropriate database package on the net.  There
  1673. are dozens of different ones out there, ranging from simple flat file,
  1674. fixed length record access to ones that go whole hog with b-trees and
  1675. schema builders.  Since these usually come with complete source code,
  1676. you'll be able to modify them to suit.
  1677.  
  1678. BTW, you could also use Resource Manager as your database as long as
  1679. you understand its extreme limitations.  I know, I know, "the Resource
  1680. Manager isn't a database", but it is quick and easy so no nasty
  1681. messages please.  If you're aware of its limitations and you might
  1682. be OK.
  1683.  
  1684. Cheers,
  1685. Rob
  1686.  
  1687. ___________________________________________________________________________
  1688. Robert S. Mah  -=-  One Step Beyond  -=-  212-947-6507  -=-  rmah@panix.com
  1689.  
  1690.  
  1691. >From conradm@yoda.wpafb.af.mil 6 May 94 14:28:14 GMT
  1692. Path: ucivax!gateway
  1693. From: conradm@yoda.wpafb.af.mil ("Conrad P. Masshardt")
  1694. Subject: Help with includes...
  1695. X-Sun-Charset: US-ASCII
  1696. Message-ID: <9405060728.aa18474@q2.ics.uci.edu>
  1697. content-length: 281
  1698. Newsgroups: fa.think-c
  1699. X-Message-ID: <9405061358.AA16889@yoda>
  1700. Approved: usenet@q2.ics.uci.edu
  1701. Lines: 10
  1702. Date: 6 May 94 14:28:14 GMT
  1703.  
  1704. Meistros,
  1705.  
  1706. I am relatively new to C programming and I am wondering what the difference
  1707. between #include <thisfile.h> and #include "thisfile.h" is.  How do I get
  1708. the compiler to understand the first?  Do I have to precompile?
  1709.  
  1710. Thanks in advance.
  1711.  
  1712. Conrad.
  1713. conradm@yoda.wpafb.af.mil
  1714. >From igormt@alumni.caltech.edu 6 May 94 22:01:41 GMT
  1715. Path: ucivax!gateway
  1716. From: igormt@alumni.caltech.edu (Igor Mikolic-Torreira)
  1717. Subject: Re: Help with includes...
  1718. NNTP-Posting-Host: alumni.caltech.edu
  1719. Message-ID: <9405061501.aa12207@q2.ics.uci.edu>
  1720. Newsgroups: fa.think-c
  1721. X-Newsreader: NN version 6.5.0 #4 (NOV)
  1722. X-Message-ID: <2qeene$3vs@gap.cco.caltech.edu>
  1723. Approved: usenet@q2.ics.uci.edu
  1724. Organization: California Institute of Technology, Pasadena
  1725. Lines: 21
  1726. Date: 6 May 94 22:01:41 GMT
  1727. References: <9405060728.aa18474@q2.ics.uci.edu>
  1728.  
  1729. "Conrad P. Masshardt" <conradm@yoda.wpafb.af.mil> writes:
  1730.  
  1731. >I am relatively new to C programming and I am wondering what the difference
  1732. >between #include <thisfile.h> and #include "thisfile.h" is.  How do I get
  1733. >the compiler to understand the first?  Do I have to precompile?
  1734.  
  1735. If you have #include <thisfile.h> the compiler will only look for thisfile.h
  1736. in the system libraries.  For THINK C that means libaries in the THINK C (or
  1737. better said, the PRoject Manager) folder or sub-folders of that folder.
  1738.  
  1739. If you have #include "thisfile.h", the compiler first looks in your local
  1740. work area and only if it fails to find it there does it look in the
  1741. system libraries.  For THINK C, the local work area is the folder your
  1742. project file is in or sub-folders of it.
  1743.  
  1744. The THINK manual has very detailed explanations of exactly where
  1745. THINK will search for included files.
  1746.  
  1747. --
  1748.    Igor Mikolic-Torreira
  1749.    igormt@alumni.caltech.edu                (finger for PGP public keys)
  1750. >From canna@bga.com 6 May 94 23:23:32 GMT
  1751. Path: ucivax!gateway
  1752. From: canna@bga.com (Canna Software Development)
  1753. Subject: Think C 7 and BBEdit...
  1754. Message-ID: <9405061623.aa16030@q2.ics.uci.edu>
  1755. Content-Type: text/plain; charset="us-ascii"
  1756. Mime-Version: 1.0
  1757. Newsgroups: fa.think-c
  1758. X-Message-ID: <199405062323.AA01208@zoom.bga.com>
  1759. Approved: usenet@q2.ics.uci.edu
  1760. Lines: 17
  1761. Date: 6 May 94 23:23:32 GMT
  1762.  
  1763. I apologize if this has already been covered, but I am having problems
  1764. getting Think C and BBEdit to talk.  Is this a bug that has been solved?
  1765. Or do I have something ugly I need to look into?
  1766.  
  1767. Thanks in advance...
  1768.  
  1769.  
  1770. ----------------------------+------------------------------------
  1771. Lloyd Sargent               | "Podia est gamia" - Sherlock Holmes
  1772. Head Honcho                 | Internet:  canna@bga.com
  1773. Canna Software Development  | AOL:       lgsargent@aol.com
  1774. 14308-B FM 812              | Phone:     (512) 243-0283
  1775. Del Valle, Texas 78617      | Fax:       (512) 243-0283
  1776.  
  1777.     "My company believes in First Admendment rights. So there!"
  1778.  
  1779.  
  1780. >From de19@umail.umd.edu 7 May 94 15:34:08 GMT
  1781. Path: ucivax!gateway
  1782. From: de19@umail.umd.edu (Dana S Emery)
  1783. Subject: Re: Help with includes...
  1784. Message-ID: <9405070834.aa23371@q2.ics.uci.edu>
  1785. In-Reply-To: Your message <9405060728.aa18474@q2.ics.uci.edu> of 6 May 94
  1786.  14:28:14 GMT
  1787. Content-Type: TEXT/plain; charset=US-ASCII
  1788. Newsgroups: fa.think-c
  1789. X-Message-ID: <Mailstrom.1.05.11270.15089.de19@umailsrv0.umd.edu>
  1790. Approved: usenet@q2.ics.uci.edu
  1791. Lines: 38
  1792. Date: 7 May 94 15:34:08 GMT
  1793.  
  1794. The difference is the search path the compiler uses to loacte the
  1795. included file.
  1796.  
  1797. for <foo.h> the compiler assumes a system header context and looks
  1798. in the "compiler" area for a matching header.
  1799.  
  1800. for "foo.h" the compiler assumes a project context and looks in the
  1801. project area, but if it fails to find anything there it will then
  1802. also look in the system area.
  1803.  
  1804. If all includes for some particular file in a library package
  1805. (say TCL's CApplication.h) were always included using "", then a
  1806. user could implment her own project-specific version of that file
  1807. and be sure that it would be used within a given project, but not
  1808. outside that project.
  1809.  
  1810. The TCL follows that convention thruout, in spite of the fact that it
  1811. would be faster to take advantage of its placement inside the compiler
  1812. tree by using <>, but by using "" you are not trapped into the TCL's
  1813. own version of its headers, thus you can fix bugs or make other
  1814. modifications to the TCL source as you need to (with the usual caveats,
  1815. always use a copy, always mark up your "improvements", consider using
  1816. subclasses in preference to re-writes...).
  1817.  
  1818. I have deliberatly simplified the scheme a little to give you the
  1819. general idea clearly.  Actually, searches are not always done, but
  1820. can be forced (thru the make... dialog); but when done the first
  1821. place searched is the parent folder of the .c file being worked on.
  1822. You should RTFM to get the whole story, especially the bit about the
  1823. search path excluding folders whose names are wraped in parens:
  1824. (foo folder) is never searched.  This allows project folders to
  1825. include ancilliary and alternate files, excluding them speeds things
  1826. up and perhaps avoids confusion as well.
  1827.  
  1828. hope that helps
  1829. --
  1830. dana s emery <de19@Umail.umd.edu>
  1831.  
  1832. >From reaper@jhunix.hcf.jhu.edu 7 May 94 19:12:40 GMT
  1833. Path: ucivax!gateway
  1834. From: reaper@jhunix.hcf.jhu.edu (John Grimes)
  1835. Subject: Alert Memory Problems
  1836. Message-ID: <9405071212.aa27601@q2.ics.uci.edu>
  1837. Content-Type: TEXT/PLAIN; charset=US-ASCII
  1838. MIME-Version: 1.0
  1839. Newsgroups: fa.think-c
  1840. X-Message-ID: <Pine.3.89.9405071531.A23333-0100000@jhunix.hcf.jhu.edu>
  1841. Approved: usenet@q2.ics.uci.edu
  1842. Lines: 39
  1843. Date: 7 May 94 19:12:40 GMT
  1844.  
  1845.  
  1846.  
  1847.         I have two questions I would really appreciate any help on.
  1848.  
  1849.         1)  I have several alert boxes that I'm calling in sequential
  1850. order.  When I get to the last one it doesn't show the pict thats inside
  1851. it.  Just the alert box.  Anyway I found this strange since all the
  1852. others work fine.  So I placed that Alert box first in the calling
  1853. order.  Now what happens is that the second last box isn't shown but this
  1854. the last box is.  Well so I figure its memory problems.  I think I need
  1855. to purge the PICTs from the other alerts out of memory.  I tried using
  1856. GetPicture to these picts and then RemoveResource but that doesn't seem
  1857. to work.  Does anyone have any ideas.  This is probably cake for most of you.
  1858.  
  1859.         2)  This one I really don't understand.  I have a dialog box
  1860. which in which I would like to put that extra rectangle around the OK
  1861. Box.  So straight out of IM is this code.
  1862.  
  1863.         GetDItem (PlayerCharacter,dOK, &iType, &iHandle,&iRect);
  1864.         PenSize(3,3);
  1865.         InsetRect( &iRect, -4,-4);
  1866.         FrameRoundRect(&iRect,16,16);
  1867.  
  1868.         This draws the rectangle above and to the left of the OK button.
  1869. Since I use the Dialog Item number of the OK button in my ModalDialog
  1870. function I know thats correct.  Well I'd appreciate yourhelp, thanks.
  1871.  
  1872.  
  1873. ******************************************************************************
  1874.         This was no time for play
  1875.         This was no time for fun
  1876.         This was no time for games
  1877.         There was work to be done.
  1878.                         Cat in the Hat Comes Back-Dr. Seuss
  1879. ******************************************************************************
  1880.                                         John Grimes
  1881.                                         reaper@jhunix
  1882.                                         HAC Consultant
  1883.  
  1884. >From kupermaj@tardis.union.edu 7 May 94 19:52:48 GMT
  1885. Path: ucivax!gateway
  1886. From: kupermaj@tardis.union.edu (Joshua Kuperman)
  1887. Subject: trivial Sym 7 C++ ? 'bout visual arch & beeper demo
  1888. Message-ID: <9405071252.aa28537@q2.ics.uci.edu>
  1889. X-Mailer: ELM [version 2.4 PL21]
  1890. Content-Type: text
  1891. Content-Length: 791
  1892. Newsgroups: fa.think-c
  1893. X-Message-ID: <199405071952.AA21130@tardis.union.edu>
  1894. Approved: usenet@q2.ics.uci.edu
  1895. Lines: 21
  1896. Date: 7 May 94 19:52:48 GMT
  1897.  
  1898. Subject: trivial Sym 7 C++ ? 'bout visual arch & beeper demo
  1899.  
  1900. Okay I got symantec C++ 7.0 for the ed price and saved enought to
  1901. get another 8Meg of ram.
  1902.  
  1903. I worked through the Beeper app demo using Visual Architect.  I decided
  1904. it would be nice to make sure it couldn't beep more than 10 times.
  1905. I used Visual Architects features to limit the range in the field, but
  1906. it only checks it when I hit OK (a command that was inherited from
  1907. someplace) and it ignores the edit when I hit the button for beep (the
  1908. one that goes to my code).  Why didn't it inherit something to update
  1909. the fields before it called my function.  What do I have to do to mayk
  1910. it.
  1911.  
  1912.  
  1913.  
  1914. --
  1915. Josh Kuperman                  The favorite doesn't always win,
  1916. kupermaj@tardis.union.edu      no matter what the odds. -I. Gershwin
  1917.  
  1918.  
  1919. >From jcaufiel@cln.etc.bc.ca 9 May 94 14:31:00 GMT
  1920. Path: ucivax!gateway
  1921. From: jcaufiel@cln.etc.bc.ca (Brent Taylor)
  1922. Subject: Preferences Files
  1923. Message-ID: <9405090730.aa24778@q2.ics.uci.edu>
  1924. Newsgroups: fa.think-c
  1925. X-Message-ID: <9405091435.AA07158@cln.etc.bc.ca>
  1926. Approved: usenet@q2.ics.uci.edu
  1927. Lines: 18
  1928. Date: 9 May 94 14:31:00 GMT
  1929.  
  1930. I wish to create a preferences file that the user is unable to open or
  1931. print from the Finder.  IM6 p9.20-23 suggests:
  1932.  
  1933. "Register a signature ... that is different from the signature of your
  1934. application, and set this signature as the creator of files that you don't
  1935. want your users to open.  This ensures that the Finder displays your
  1936. message ['STR ' resource id -16397] instead of launching your application
  1937. when the user double-clicks these documents."
  1938.  
  1939. Is this the recommended approach?  Is there any way other than custom icon
  1940. resources to give such a preferences file its own icon?
  1941.  
  1942. _____________________________________________________________________________
  1943. Brent Taylor, Computer Science / Math Teacher            Phone: (604)865-4674
  1944. Elkford Secondary School                                   Fax: (604)865-2915
  1945. Box 910, Elkford, BC, Canada  V0B 1H0
  1946. jcaufiel@cln.etc.bc.ca
  1947.  
  1948. >From hs47+@andrew.cmu.edu 9 May 94 14:35:09 GMT
  1949. Path: ucivax!gateway
  1950. From: hs47+@andrew.cmu.edu (Hong Shi)
  1951. Subject: Help: Think Reference
  1952. Message-ID: <9405090735.aa24946@q2.ics.uci.edu>
  1953. Newsgroups: fa.think-c
  1954. X-Message-ID: <ghnYbmy00iUvQ3Flox@andrew.cmu.edu>
  1955. Approved: usenet@q2.ics.uci.edu
  1956. Lines: 11
  1957. Date: 9 May 94 14:35:09 GMT
  1958.  
  1959. I am new to Macintosh programming, please help me to start, thanks ahead.
  1960.  
  1961. As my understanding of manual for Symantec c++, the Think Reference
  1962. should include reference for ToolBox procedures, but I cannot find it in
  1963. my packgae (Version 6.0). And, somewhere in the manual it says I can
  1964. just click on a procedure  name and it will find the manual page for me.
  1965. I tried but it doesn't work, should I set something?
  1966.  
  1967. I am using a Centris 650, System 7.1
  1968.  
  1969. Please reply to hshi@cmu.edu.
  1970. >From MARKD@leva.leeds.ac.uk 9 May 94 15:48:14 GMT
  1971. Path: ucivax!gateway
  1972. From: MARKD@leva.leeds.ac.uk ("Mark Davies, Caddetc, (44) 532 305005" )
  1973. Subject: Thanks
  1974. Via: uk.ac.leeds.icf.leva; Mon, 9 May 1994 15:24:03 +0100
  1975. Message-ID: <9405090848.aa28304@q2.ics.uci.edu>
  1976. Newsgroups: fa.think-c
  1977. X-Message-ID: <9405090848.aa28304@q2.ics.uci.edu>
  1978. Approved: usenet@q2.ics.uci.edu
  1979. Lines: 13
  1980. Date: 9 May 94 15:48:14 GMT
  1981.  
  1982. Thanks,
  1983.  
  1984.  to all of you that helped. I tried all your suggestions to no avail.
  1985.  
  1986. I then got serious and looked in the box, I pressed the SIMM's down ( more
  1987. in hope then anything!) and the machine came back to life, I then
  1988. had to rebuild the deskstop and reboot without finder re-loading windows.
  1989.  
  1990. Everythings fine now,
  1991.  
  1992. Thanks for the help.
  1993.  
  1994. Mark Davies
  1995. >From Brian.Bezanson@macsrv.mgi.com 9 May 94 16:52:03 GMT
  1996. Path: ucivax!gateway
  1997. From: Brian.Bezanson@macsrv.mgi.com (Brian Bezanson)
  1998. Subject: RE>Help: Think Reference
  1999. Message-ID: <9405090952.aa03150@q2.ics.uci.edu>
  2000. X-Mailer: InterCon Dispatcher/SMTP for QuickMail
  2001. Newsgroups: fa.think-c
  2002. X-Message-ID: <199405091152373096@macsrv.mgi.com>
  2003. Approved: usenet@q2.ics.uci.edu
  2004. X-Priority: 4
  2005. Lines: 28
  2006. Date: 9 May 94 16:52:03 GMT
  2007.  
  2008. Date    5/9/94
  2009. Subject RE>Help- Think Reference
  2010. From    Brian Bezanson
  2011. To      Hong Shi, think-c
  2012.  
  2013.         Reply to:   RE>Help: Think Reference
  2014. >I am new to Macintosh programming, please help me to start, thanks ahead.
  2015. >
  2016. >As my understanding of manual for Symantec c++, the Think Reference
  2017. >should include reference for ToolBox procedures, but I cannot find it in
  2018. >my packgae (Version 6.0). And, somewhere in the manual it says I can
  2019. >just click on a procedure  name and it will find the manual page for me.
  2020. >I tried but it doesn't work, should I set something?
  2021.  
  2022. The version of THINK Reference is the full version of the application, but it
  2023. only includes the ANSI C and C++ Streams databases. To get the databases for
  2024. the Mac Toolbox calls you need to purchase the seperate package.
  2025.  
  2026. ====
  2027. Brian R Bezanson                      Phone: +1 612 854 1220
  2028. Management Graphics, Inc.             Fax:   +1 612 851 6159
  2029. 1401 E 79th Street                    internet: bezanson@mgi.com
  2030. Minneapolis, MN 55425                 AppleLink: BEZANSON
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036. >From gurgle@netcom.com 9 May 94 17:25:37 GMT
  2037. Path: ucivax!gateway
  2038. From: gurgle@netcom.com (Pete Gontier)
  2039. Subject: Re: Preferences Files
  2040. Message-ID: <9405091025.aa06240@q2.ics.uci.edu>
  2041. In-Reply-To: <9405090730.aa24778@q2.ics.uci.edu> from "Brent Taylor" at May 9, 94 02:31:00 pm
  2042. X-Mailer: ELM [version 2.4 PL23]
  2043. Content-Transfer-Encoding: 7bit
  2044. Content-Type: text/plain; charset=US-ASCII
  2045. Content-Length: 993
  2046. MIME-Version: 1.0
  2047. Newsgroups: fa.think-c
  2048. X-Message-ID: <199405091723.KAA09748@netcom.com>
  2049. Approved: usenet@q2.ics.uci.edu
  2050. Lines: 20
  2051. Date: 9 May 94 17:25:37 GMT
  2052.  
  2053. > Is this the recommended approach? Is there any way other than custom
  2054. > icon resources to give such a preferences file its own icon?
  2055.  
  2056. Set its bundle bit and go through the whole ritual necessary to create
  2057. a BNDL and all other appropriate resources? That's uglier than a custom
  2058. resource, but at least the user can't inadvertently change it.
  2059.  
  2060. Also consider simply setting the file type and creator to that of one of
  2061. the system preferences files. The icon will automatically be the little
  2062. radio button charicature we all know and love. With an appropriate
  2063. filename, I can't imagine any user confusion, especially since it's
  2064. already been done several times.
  2065.  
  2066. --
  2067.  Pete Gontier, CTO, Integer Poet Software; gurgle@netcom.com
  2068.  
  2069.  "...someone not acquainted with the Christian mythology of the
  2070.  Crucifixion might consider a Crucifix to be a particularly sadistic
  2071.  piece of erotica... We of the ACLU will continue to defend your right to
  2072.  worship such objects if it pleases you." -- Gregory J. Wageman
  2073. >From gurgle@netcom.com 9 May 94 17:30:58 GMT
  2074. Path: ucivax!gateway
  2075. From: gurgle@netcom.com (Pete Gontier)
  2076. Subject: Re: Help: Think Reference
  2077. Message-ID: <9405091030.aa06720@q2.ics.uci.edu>
  2078. In-Reply-To: <9405090735.aa24946@q2.ics.uci.edu> from "Hong Shi" at May 9, 94 02:35:09 pm
  2079. X-Mailer: ELM [version 2.4 PL23]
  2080. Content-Transfer-Encoding: 7bit
  2081. Content-Type: text/plain; charset=US-ASCII
  2082. Content-Length: 987
  2083. MIME-Version: 1.0
  2084. Newsgroups: fa.think-c
  2085. X-Message-ID: <199405091730.KAA10731@netcom.com>
  2086. Approved: usenet@q2.ics.uci.edu
  2087. Lines: 19
  2088. Date: 9 May 94 17:30:58 GMT
  2089.  
  2090. > As my understanding of manual for Symantec c++, the Think Reference
  2091. > should include reference for ToolBox procedures, but I cannot find it
  2092. > in my packgae (Version 6.0). And, somewhere in the manual it says I
  2093. > can just click on a procedure name and it will find the manual page
  2094. > for me. I tried but it doesn't work, should I set something?
  2095.  
  2096. >From page 29: "If you own THINK Reference... you can get... online
  2097. information concerning toolbox calls..." Note the big 'if'. What the
  2098. manual means there is *if* you own THINK Reference as a separate
  2099. product, you can do the lookups you want to do. THINK Reference *does*
  2100. work, and it *is* useful, but the only database you have for use with it
  2101. is the database for the ANSI libraries ('fopen' and friends). To get the
  2102. other databases, including those for the Mac Toolbox, you have to buy a
  2103. separate package.
  2104.  
  2105. --
  2106.  Pete Gontier, CTO, Integer Poet Software; gurgle@netcom.com
  2107.  
  2108.  You thought Obfuscated C was confusing? Wait for Obfuscated C++!
  2109. >From Anderson#m#_Tim@cpms.saic.com 9 May 94 18:32:58 GMT
  2110. Path: ucivax!gateway
  2111. From: Anderson#m#_Tim@cpms.saic.com ("Anderson, Tim")
  2112. Subject: address to subscribe?
  2113. Message-ID: <9405091132.aa11098@q2.ics.uci.edu>
  2114. Return-receipt-to: "Anderson, Tim" <Anderson#m#_Tim@cpms.saic.com>
  2115. Newsgroups: fa.think-c
  2116. X-Message-ID: <9405091132.aa11098@q2.ics.uci.edu>
  2117. Approved: usenet@q2.ics.uci.edu
  2118. Lines: 7
  2119. Date: 9 May 94 18:32:58 GMT
  2120.  
  2121. Could someone please help me by sending the e-mail address where I can
  2122. subscribe to the think c mailing list. I was receiving mail, but then my local
  2123. mail account died, and since then, I have not received any more (and I lost the
  2124. address.)
  2125.  
  2126. Thanks in advance,
  2127. Tim
  2128. >From blakeman@bnr.ca 9 May 94 20:45:00 GMT
  2129. Path: ucivax!gateway
  2130. From: blakeman@bnr.ca ("jim (j.) blakeman" )
  2131. Subject: Unsubscribe
  2132. X400-Originator: /dd.id=1625593/g=jim/i=j/s=blakeman/@bnr.ca
  2133. Content-Identifier: Unsubscribe
  2134. Message-ID: <9405091344.aa18779@q2.ics.uci.edu>
  2135. Newsgroups: fa.think-c
  2136. X400-Received: 
  2137.  by mta bnr.ca in /PRMD=BNR/ADMD=TELECOM.CANADA/C=CA/; Relayed; Mon, 9 May 1994 16:43:49 -0400
  2138. X400-Received: 
  2139.  by /PRMD=BNR/ADMD=TELECOM.CANADA/C=CA/; Relayed; Mon, 9 May 1994 16:42:41 -0400
  2140. X400-Received: 
  2141.  by /PRMD=BNR/ADMD=TELECOM.CANADA/C=CA/; Relayed; Mon, 9 May 1994 16:40:00 -0400
  2142. X-Message-ID: <"23383 Mon May  9 16:42:50 1994"@bnr.ca>
  2143. Approved: usenet@q2.ics.uci.edu
  2144. X400-Content-Type: P2-1984 (2)
  2145. Lines: 5
  2146. Date: 9 May 94 20:45:00 GMT
  2147. X400-MTS-Identifier: 
  2148.  [/PRMD=BNR/ADMD=TELECOM.CANADA/C=CA/;bcars735.b.374:09.04.94.20.42.41]
  2149.  
  2150. unsubscribe
  2151.  
  2152. Please unsibscribe me from this list.  Thank-you.
  2153.  
  2154. BLAKEMAN@BNR.CA
  2155. >From U42641%UICVM@uic.edu 9 May 94 23:13:47 GMT
  2156. Path: ucivax!gateway
  2157. From: U42641%UICVM@uic.edu ("Richard K. Wolf (312) 996-8291" )
  2158. Subject: AEInstallHandler Question.
  2159. Message-ID: <9405091613.aa29062@q2.ics.uci.edu>
  2160. Newsgroups: fa.think-c
  2161. X-Message-ID: <9405091613.aa29062@q2.ics.uci.edu>
  2162. Approved: usenet@q2.ics.uci.edu
  2163. Lines: 40
  2164. Date: 9 May 94 23:13:47 GMT
  2165.  
  2166. Could anyone clue me in on why the following:
  2167.  
  2168. /* function declarations ... */
  2169.  
  2170. void         InitEventHandlers( void );
  2171. pascal OSErr DoOpen( AppleEvent *theAppleEvent, AppleEvent *reply,
  2172.                          long refCon);
  2173.  
  2174. ..
  2175.  
  2176. void main (void)
  2177. {
  2178.    InitToolbox();
  2179.    InitEventHandlers();
  2180.    ...
  2181. }
  2182.  
  2183. void InitEventHandlers( void )
  2184. {
  2185.  
  2186.  OSErr err;
  2187.  
  2188.  err = AEInstallEventHandler( kCoreEventClass, kAEOpenApplication,
  2189.           DoOpen, 0L, false);
  2190.  ...
  2191. }
  2192.  
  2193. pascal OSErr DoOpen( AppleEvent *theAppleEvent, AppleEvent *reply,
  2194.           long refCon)
  2195. {
  2196.  return noErr;
  2197. }
  2198.  
  2199. fails to compile claiming the third argument in my AEInstallEventHandler
  2200. was not expected from the prototype?
  2201.  
  2202. Yours,
  2203. C Idiot Extroadinaire
  2204.  
  2205.  
  2206. >From zuff@aol.com 10 May 94 06:44:23 GMT
  2207. Path: ucivax!gateway
  2208. From: zuff@aol.com
  2209. Subject: re: File Structures
  2210. Message-ID: <9405092344.aa16583@q2.ics.uci.edu>
  2211. X-Mailer: America Online Mailer
  2212. Newsgroups: fa.think-c
  2213. X-Message-ID: <9405100244.tn340682@aol.com>
  2214. Approved: usenet@q2.ics.uci.edu
  2215. Lines: 21
  2216. Date: 10 May 94 06:44:23 GMT
  2217.  
  2218. >Does anyone have any advice (even very basic - I'm in poland and
  2219. >it's rather difficult for me to get any mac programming books here)
  2220. >on how to store record and field type information in a file?
  2221. >Do I basically have to scan through the whole file to get some basic
  2222. >identifying info on each record, even if I don't want to read in
  2223. >the whole record?  Is there any way to encode jumping points for each
  2224. >record at the beginning of each file?
  2225.  
  2226. Try using a header for each file that contains information about the file,
  2227. including a jump table to access specific fields or records.  Set aside a
  2228. specific amount at the beginning of the file that contains all the
  2229. information you want, including the number of fields, the length of each
  2230. field, etc.  The next portion of the file could then contain a jump table to
  2231. indicate the location of the records (assuming you want variable length
  2232. records).  You'll have to maintain the jump table as the file is edited, or
  2233. simply set it up at write time.  If you have wildly divergent field types,
  2234. you can also set aside a space in the file for field descriptors.
  2235.  
  2236. Good luck,
  2237.  
  2238. duff caldewey
  2239. >From reaper@jhunix.hcf.jhu.edu 10 May 94 06:55:57 GMT
  2240. Path: ucivax!gateway
  2241. From: reaper@jhunix.hcf.jhu.edu (John Grimes)
  2242. Subject: OpenDeskAcc Problems
  2243. Message-ID: <9405092355.aa17228@q2.ics.uci.edu>
  2244. Content-Type: TEXT/PLAIN; charset=US-ASCII
  2245. MIME-Version: 1.0
  2246. Newsgroups: fa.think-c
  2247. X-Message-ID: <Pine.3.89.9405100236.A13573-0100000@jhunix.hcf.jhu.edu>
  2248. Approved: usenet@q2.ics.uci.edu
  2249. Lines: 21
  2250. Date: 10 May 94 06:55:57 GMT
  2251.  
  2252.  
  2253.  
  2254.         For a while I had the OpenDeskAcc function working properly, then
  2255. suddenly it stopped working.  Now the desk accesories aren't opened until
  2256. after I quit the application.  Or to explain, they are still given the
  2257. open command yet control of the computer is not given to them until after
  2258. I quit my application.  Since none of my recent changes have anything to
  2259. do with this function I'm kind of stumped.  I'd appreciate any help that
  2260. you can give me.  Thank you.
  2261.  
  2262. ******************************************************************************
  2263.         This was no time for play
  2264.         This was no time for fun
  2265.         This was no time for games
  2266.         There was work to be done.
  2267.                         Cat in the Hat Comes Back-Dr. Seuss
  2268. ******************************************************************************
  2269.                                         John Grimes
  2270.                                         reaper@jhunix
  2271.                                         HAC Consultant
  2272.  
  2273. >From john@helix.net 10 May 94 11:42:41 GMT
  2274. Path: ucivax!gateway
  2275. From: john@helix.net (John Lawrie)
  2276. Subject: unsubscribe
  2277. Message-ID: <9405100442.aa08631@q2.ics.uci.edu>
  2278. X-Mailer: ELM [version 2.4 PL23]
  2279. Content-Transfer-Encoding: 8bit
  2280. Content-Type: text/plain; charset=US-ASCII
  2281. Content-Length: 58
  2282. MIME-Version: 1.0
  2283. Newsgroups: fa.think-c
  2284. X-Message-ID: <199405101025.DAA07313@helix.net>
  2285. Approved: usenet@q2.ics.uci.edu
  2286. Lines: 3
  2287. Date: 10 May 94 11:42:41 GMT
  2288.  
  2289. please reomve me from this list.
  2290. Thank You
  2291. Jlawrie@sfu.ca
  2292. >From JeffC@cc.snow.edu 10 May 94 12:18:22 GMT
  2293. Path: ucivax!gateway
  2294. From: JeffC@cc.snow.edu ("Jeffrey K. Carney")
  2295. Subject: Re: AEInstallHandler Question.
  2296. Message-ID: <9405100518.aa09607@q2.ics.uci.edu>
  2297. Content-Type: text/plain; charset="us-ascii"
  2298. Mime-Version: 1.0
  2299. Newsgroups: fa.think-c
  2300. X-Message-ID: <9405100518.aa09607@q2.ics.uci.edu>
  2301. Approved: usenet@q2.ics.uci.edu
  2302. Lines: 6
  2303. Date: 10 May 94 12:18:22 GMT
  2304.  
  2305. Did you try passing the ADDRESS of the function instead of just the name?
  2306. Strict prototyping might require a function pointer.
  2307.  
  2308. Jeff
  2309.  
  2310.  
  2311. >From 90425046@ex.ecip.osaka-u.ac.jp 10 May 94 12:44:23 GMT
  2312. Path: ucivax!gateway
  2313. From: 90425046@ex.ecip.osaka-u.ac.jp
  2314. Subject: (none)
  2315. Message-ID: <9405100544.aa10257@q2.ics.uci.edu>
  2316. Newsgroups: fa.think-c
  2317. X-Message-ID: <9405101202.AA22140@tgray03.ex.ecip.osaka-u.ac.jp>
  2318. Approved: usenet@q2.ics.uci.edu
  2319. Lines: 1
  2320. Date: 10 May 94 12:44:23 GMT
  2321.  
  2322. help
  2323. >From udsugar@cerebrum.impaqt.drexel.edu 10 May 94 13:19:04 GMT
  2324. Path: ucivax!gateway
  2325. From: udsugar@cerebrum.impaqt.drexel.edu (Dave Sugar)
  2326. Subject: Reading Serial Port?
  2327. Message-ID: <9405100619.aa11331@q2.ics.uci.edu>
  2328. Newsgroups: fa.think-c
  2329. X-Message-ID: <9405101318.AA11442@impaqt.drexel.edu>
  2330. Approved: usenet@q2.ics.uci.edu
  2331. Lines: 48
  2332. Date: 10 May 94 13:19:04 GMT
  2333.  
  2334.  
  2335.   I am working on a project where I need to read and write data from the
  2336. serial port.  I have the basic functions for acessing the serial port
  2337. don.  But, while writing some more advanced stuff I'm having some problems.
  2338.  
  2339.   What I am trying to do is to read a line (deliminated by a new line or
  2340. return) from the serial port.  The code that I have used to read from the
  2341. serial port is as follows:
  2342.  
  2343. long DCSerial::Read (char data[], long length)
  2344. {
  2345.    IOParam   param;
  2346.    OSErr     err = 0;
  2347.    long      avail;
  2348.  
  2349. // checks to make sure port open
  2350.  
  2351. // checks for characters avail, store in avail
  2352.  
  2353.    memset (¶m, 0, sizeof (IOParam));
  2354.    param.ioRefNum = in_refNum;          // read from .AIn
  2355.    param.ioBuffer = data;               // read into data
  2356.    param.ioReqCount = avail;            // read as many chars as available
  2357.    param.ioPosMode = fsAtMark;          // read from mark
  2358.  
  2359.    err = PBRead ((ParmBlkPtr) ¶m, FALSE);
  2360.  
  2361. Now, this code works just fine and it reads everything that is in the port
  2362. buffer into the variable data with no problem.  What I would like to do is
  2363. to read only up to the first new-line character.  Looking in Think Ref it
  2364. seems that this would be possible.  By chaning the line param.ioPosMode etc.
  2365. to something like:
  2366.  
  2367.   param.ioPosMode = fsAtMark | 0x80 | (256 * '\n');
  2368.  
  2369.   But when I do this I don't get any differecne in the data that is read in.
  2370. It will still read in as much data as it can (size of avail).  The mode
  2371. that I am trying to set with in the above like seems to be a PBRead thing
  2372. not specific to serial ports.  I have not yet tried it with a file to see
  2373. if I can get it to work that way.
  2374.  
  2375.   Any help would be greatly appreciated..
  2376.   Thanks
  2377.   Dave Sugar
  2378.   udsugar@impaqt.drexel.edu
  2379.   udsugar@mcs.drexel.edu
  2380.  
  2381.  
  2382. >From gurgle@netcom.com 10 May 94 14:53:34 GMT
  2383. Path: ucivax!gateway
  2384. From: gurgle@netcom.com (Pete Gontier)
  2385. Subject: Re: File Structures
  2386. Message-ID: <9405100753.aa14116@q2.ics.uci.edu>
  2387. In-Reply-To: <9405092344.aa16583@q2.ics.uci.edu> from "zuff@aol.com" at May 10, 94 06:44:23 am
  2388. X-Mailer: ELM [version 2.4 PL23]
  2389. Content-Transfer-Encoding: 7bit
  2390. Content-Type: text/plain; charset=US-ASCII
  2391. Content-Length: 1877
  2392. MIME-Version: 1.0
  2393. Newsgroups: fa.think-c
  2394. X-Message-ID: <199405101453.HAA08228@netcom.com>
  2395. Approved: usenet@q2.ics.uci.edu
  2396. Lines: 34
  2397. Date: 10 May 94 14:53:34 GMT
  2398.  
  2399. > Try using a header for each file that contains information about the
  2400. > file, including a jump table to access specific fields or records. Set
  2401. > aside a specific amount at the beginning of the file that contains all
  2402. > the information you want, including the number of fields, the length
  2403. > of each field, etc. The next portion of the file could then contain a
  2404. > jump table to indicate the location of the records (assuming you want
  2405. > variable length records). You'll have to maintain the jump table as
  2406. > the file is edited, or simply set it up at write time. If you have
  2407. > wildly divergent field types, you can also set aside a space in the
  2408. > file for field descriptors.
  2409.  
  2410. One trick worth mentioning is a basic technique for allocating
  2411. variable-length chunks. At some point, one needs to be able to read a
  2412. constant-length block and decide what to do with it. Since sometimes
  2413. even the index to a file can be variable-length, you don't want to put
  2414. it at the head of the file. If you did, you'd constantly be shuffling
  2415. other data out of the way in order to grow the index.
  2416.  
  2417. The trick: store only a 32-bit unsigned offset at the beginning of the
  2418. file. This offset points you to the index, which lives at the end of the
  2419. file. You can expand the end of the file all you like without shuffling
  2420. data out of the way. If you keep the index in memory while modifying
  2421. the file (common practice to enhance performance), you can even append
  2422. non-index data to the file, overwriting the disk representation of the
  2423. index, and then rewrite the index onto the (new) end of the file again.
  2424.  
  2425. Of course, you could always use the resource fork for the index and rely
  2426. on the Resource Manager to shuffle chunks on your behalf, but that's not
  2427. a C technique but a Macintosh technique.
  2428.  
  2429. --
  2430.  Pete Gontier, CTO, Integer Poet Software; gurgle@netcom.com
  2431.  
  2432.  "...where they burn books, people are next." -- XTC
  2433. >From gurgle@netcom.com 10 May 94 17:54:32 GMT
  2434. Path: ucivax!gateway
  2435. From: gurgle@netcom.com (Pete Gontier)
  2436. Subject: Re: AEInstallHandler Question.
  2437. Message-ID: <9405101054.aa25534@q2.ics.uci.edu>
  2438. In-Reply-To: <9405100518.aa09607@q2.ics.uci.edu> from "Jeffrey K. Carney" at May 10, 94 12:18:22 pm
  2439. X-Mailer: ELM [version 2.4 PL23]
  2440. Content-Transfer-Encoding: 7bit
  2441. Content-Type: text/plain; charset=US-ASCII
  2442. Content-Length: 459
  2443. MIME-Version: 1.0
  2444. Newsgroups: fa.think-c
  2445. X-Message-ID: <199405101753.KAA21314@netcom.com>
  2446. Approved: usenet@q2.ics.uci.edu
  2447. Lines: 11
  2448. Date: 10 May 94 17:54:32 GMT
  2449.  
  2450. > Did you try passing the ADDRESS of the function instead of just the
  2451. > name? Strict prototyping might require a function pointer.
  2452.  
  2453. The name of a function is a synonym for a pointer to that function,
  2454. just like the name of an array is a synonym for a pointer to the first
  2455. element of the array. I'd wager this is not his problem.
  2456.  
  2457. --
  2458.  Pete Gontier, CTO, Integer Poet Software; gurgle@netcom.com
  2459.  
  2460.  "Reality is 50 million polygons per second." -- Alvy Ray Smith
  2461. >From de19@umail.umd.edu 10 May 94 17:54:34 GMT
  2462. Path: ucivax!gateway
  2463. From: de19@umail.umd.edu (Dana S Emery)
  2464. Subject: Re: File Structures
  2465. Message-ID: <9405101054.aa25421@q2.ics.uci.edu>
  2466. In-Reply-To: Your message <9405092344.aa16583@q2.ics.uci.edu> of 10 May 94
  2467.  06:44:23 GMT
  2468. Content-Type: TEXT/plain; charset=US-ASCII
  2469. Newsgroups: fa.think-c
  2470. X-Message-ID: <Mailstrom.1.05.16978.-3114.de19@umailsrv0.umd.edu>
  2471. Approved: usenet@q2.ics.uci.edu
  2472. Lines: 65
  2473. Date: 10 May 94 17:54:34 GMT
  2474.  
  2475. >Does anyone have any advice (even very basic - I'm in poland and
  2476. >it's rather difficult for me to get any mac programming books here)
  2477. >on how to store record and field type information in a file?
  2478.  
  2479. this isnt really a mac problem, the mac file system imposes no
  2480. structure on the content of a data fork, this means you get to
  2481. determine whatever structure is used there.
  2482.  
  2483. There are a number of conventional structures in common use, the
  2484. file type code will be set to reflect their usage: EPSF, TIFF,
  2485. TEXT, PICT...  Most applications have unique binary file content
  2486. with appropriate file type codes, yours will presumably fit into
  2487. this category.  Apple has a registration program for your
  2488. applications signature, it may also have one for file types, Im
  2489. not sure on that tho.
  2490.  
  2491. There are a number of clever ways to structure complex binary
  2492. information in a file, files on tape have the difficulty that random
  2493. access usage is very expensive timewise, and rewriting parts of a
  2494. tape can be problematical, so structures used for tape are often
  2495. different from structures used for disk, luckily you are unlikely
  2496. to have to deal with tape, so no more need be said about that.
  2497.  
  2498. One common approach on disk is to have a preliminary record much
  2499. like a table of contents in a book.  Commonly it is a structure
  2500. with fields each of which gives the value of the mark needed to
  2501. read a given structure, and perhaps also the length of that
  2502. structure (which may be variable).
  2503.  
  2504. Future growth of your code would normally entail modifications
  2505. to this structure, so knowledge of it should be limited to the
  2506. units that deal with file I/O.  I like to work with objects, I
  2507. would use an object to encaposulate that code in a way that frees
  2508. the rest of your code from specific details.  It real hard to
  2509. make detailed recomendations without in-depth knowledge, and
  2510. really that should not be necessary, you have to be able to
  2511. cope with the debugging (yes, there will be problems..), so
  2512. you need to do enough of the design work that you are comfortable
  2513. with the design.
  2514.  
  2515. I would start with some primitive utilitys, you probably need a
  2516. central routine which understands how to put an arbitrary byte
  2517. field to the file, it should be fed by routines which have
  2518. progressivly more knowledge of the types you are actually using.
  2519.  
  2520. Higher level routines would ensure that the "table of contents"
  2521. gets filled in properly, and that it gets written out properly.
  2522.  
  2523. Reading in your data has to be feasible, and supplying an initial,
  2524. empty version of the file is also necessary, get these 3 coded and
  2525. tested and you will have proven your design.
  2526.  
  2527. The Table of Contents should contain some declaration of version
  2528. level to allow for expansion, and, finally, you should give some
  2529. thought to invalid states and how your code should react to them
  2530. (corrupt files).
  2531.  
  2532. It is commonly said that code flows easily from a good data
  2533. specification, so if you find the code flowing slowly rethink how
  2534. you are dealing with your data.
  2535.  
  2536. good luck.
  2537. --
  2538. dana s emery <de19@umail.umd.edu>
  2539.  
  2540. >From rstory@crl.com 10 May 94 18:42:26 GMT
  2541. Path: ucivax!gateway
  2542. From: rstory@crl.com (Robert Story)
  2543. Subject: Re: Reading Serial Port?
  2544. Message-ID: <9405101142.aa29225@q2.ics.uci.edu>
  2545. In-Reply-To: <9405100619.aa11331@q2.ics.uci.edu> from "Dave Sugar" at May 10, 94 01:19:04 pm
  2546. X-Mailer: ELM [version 2.4 PL23]
  2547. Content-Transfer-Encoding: 7bit
  2548. Content-Type: text/plain; charset=US-ASCII
  2549. Content-Length: 785
  2550. Mime-Version: 1.0
  2551. Newsgroups: fa.think-c
  2552. X-Message-ID: <199405101839.AA09382@crl2.crl.com>
  2553. Approved: usenet@q2.ics.uci.edu
  2554. Lines: 14
  2555. Date: 10 May 94 18:42:26 GMT
  2556.  
  2557. >   But when I do this I don't get any differecne in the data that is read in.
  2558. > It will still read in as much data as it can (size of avail).  The mode
  2559. > that I am trying to set with in the above like seems to be a PBRead thing
  2560. > not specific to serial ports.  I have not yet tried it with a file to see
  2561. > if I can get it to work that way.
  2562. >
  2563. Why not just have two read routines - one that reads all available chars
  2564. into a buffer, then a second that reads up to the first newline in the
  2565. buffer (calling the first routine if the buffer gets empty).  You have to
  2566. make sure all your read routines use the buffer, though.  But it can be done.
  2567.  
  2568. --
  2569. |   Robert Story    |  Software Engineer  |#include <std/disclaimer>|
  2570. |  rstory@crl.com   |  Atlanta, Georgia   |   War Damn Eagle! '90   |
  2571. >From waldorfm@rferl.org 10 May 94 21:38:28 GMT
  2572. Path: ucivax!gateway
  2573. From: waldorfm@rferl.org (WaldorfM)
  2574. Subject: subscribe request
  2575. Message-ID: <9405101438.aa09851@q2.ics.uci.edu>
  2576. Content-transfer-encoding: 7BIT
  2577. Content-type: TEXT/PLAIN; CHARSET=US-ASCII
  2578. Newsgroups: fa.think-c
  2579. X-Message-ID: <01HC6XI7258I8WXZR0@MUVAXA.RFERL.ORG>
  2580. Approved: usenet@q2.ics.uci.edu
  2581. Lines: 3
  2582. Date: 10 May 94 21:38:28 GMT
  2583.  
  2584. help
  2585. subscribe Markus Waldorf
  2586.  
  2587. >From D.Thomas@vthrc.uq.edu.au 10 May 94 21:53:59 GMT
  2588. Path: ucivax!gateway
  2589. From: D.Thomas@vthrc.uq.edu.au (Danny Thomas)
  2590. Subject: Re: Reading Serial Port?
  2591. X-Sender: thomas@pop3.vthrc.uq.oz.au.
  2592. Message-ID: <9405101453.aa11401@q2.ics.uci.edu>
  2593. Content-Type: text/plain; charset="us-ascii"
  2594. Mime-Version: 1.0
  2595. Newsgroups: fa.think-c
  2596. X-Message-ID: <199405102152.HAA00489@xroads.vthrc.uq.oz.au>
  2597. Approved: usenet@q2.ics.uci.edu
  2598. Lines: 13
  2599. Date: 10 May 94 21:53:59 GMT
  2600.  
  2601. >  I am working on a project where I need to read and write data from the
  2602. >serial port.  I have the basic functions for acessing the serial port
  2603. >don.  But, while writing some more advanced stuff I'm having some problems.
  2604. when faced with serial port I/O I took the route of using the Comms Toolbox
  2605. instead of low-level drivers or accessing hardware. Your needs mightn't be
  2606. met by this, but it was easier than I had hoped. And that's speaking as a
  2607. very part-time mac programmer who was glad that he didn't have to write a
  2608. dialog box a simple as the serial tool's
  2609.  
  2610. cheers,
  2611. Danny Thomas
  2612.  
  2613.  
  2614. >From donpoletti@aol.com 10 May 94 23:01:44 GMT
  2615. Path: ucivax!gateway
  2616. From: donpoletti@aol.com
  2617. Subject: C2PStr
  2618. Message-ID: <9405101601.aa15744@q2.ics.uci.edu>
  2619. X-Mailer: America Online Mailer
  2620. Newsgroups: fa.think-c
  2621. X-Message-ID: <9405101901.tn365799@aol.com>
  2622. Approved: usenet@q2.ics.uci.edu
  2623. Lines: 5
  2624. Date: 10 May 94 23:01:44 GMT
  2625.  
  2626. Where the Heck is the library that contains the C2PStr and the P2CStr
  2627. routines? The headers are defined in "pascal.h" but it won't link without the
  2628. libraries(of coarse). Some suggested the MacTraps2 library but that one isn't
  2629. it, or if it is I have something else wrong like link order or code in wrong
  2630. segments if that's possible.
  2631. >From canna@bga.com 10 May 94 23:41:55 GMT
  2632. Path: ucivax!gateway
  2633. From: canna@bga.com (Canna Software Development)
  2634. Subject: Re: AEInstallHandler Question.
  2635. Message-ID: <9405101641.aa18650@q2.ics.uci.edu>
  2636. Content-Type: text/plain; charset="us-ascii"
  2637. Mime-Version: 1.0
  2638. Newsgroups: fa.think-c
  2639. X-Message-ID: <199405102340.AA21669@zoom.bga.com>
  2640. Approved: usenet@q2.ics.uci.edu
  2641. Lines: 104
  2642. Date: 10 May 94 23:41:55 GMT
  2643.  
  2644. >Could anyone clue me in on why the following:
  2645. >
  2646. >/* function declarations ... */
  2647. >
  2648. >void         InitEventHandlers( void );
  2649. >pascal OSErr DoOpen( AppleEvent *theAppleEvent, AppleEvent *reply,
  2650. >                         long refCon);
  2651. >
  2652. >...
  2653. >
  2654. >void main (void)
  2655. >{
  2656. >   InitToolbox();
  2657. >   InitEventHandlers();
  2658. >   ...
  2659. >}
  2660. >
  2661. >void InitEventHandlers( void )
  2662. >{
  2663. >
  2664. > OSErr err;
  2665. >
  2666. > err = AEInstallEventHandler( kCoreEventClass, kAEOpenApplication,
  2667. >          DoOpen, 0L, false);
  2668. > ...
  2669. >}
  2670. >
  2671. >pascal OSErr DoOpen( AppleEvent *theAppleEvent, AppleEvent *reply,
  2672. >          long refCon)
  2673. >{
  2674. > return noErr;
  2675. >}
  2676. >
  2677. >fails to compile claiming the third argument in my AEInstallEventHandler
  2678. >was not expected from the prototype?
  2679. >
  2680. >Yours,
  2681. >C Idiot Extroadinaire
  2682.  
  2683.  
  2684. Well, I took the above code (having messed with AppleEvents quite heavily
  2685. as of late) and compared it with my code. Nope. Couldn't see anything
  2686. obvious.  So I took the above code and stuffed it into a file named main.c.
  2687. Below is the code:
  2688.  
  2689. #include <AppleEvents.h>
  2690.  
  2691. /* function declarations ... */
  2692.  
  2693. void         InitEventHandlers( void );
  2694. pascal OSErr DoOpen( AppleEvent *theAppleEvent, AppleEvent *reply,
  2695.                          long refCon);
  2696.  
  2697.  
  2698. void main (void)
  2699. {
  2700. //   InitToolbox();
  2701.    InitEventHandlers();
  2702. }
  2703.  
  2704. void InitEventHandlers( void )
  2705. {
  2706.  
  2707.  OSErr err;
  2708.  
  2709.  err = AEInstallEventHandler( kCoreEventClass, kAEOpenApplication,
  2710.           DoOpen, 0L, false);
  2711. }
  2712.  
  2713. pascal OSErr DoOpen( AppleEvent *theAppleEvent, AppleEvent *reply,
  2714.           long refCon)
  2715. {
  2716.  return noErr;
  2717. }
  2718.  
  2719.  
  2720. I then set the compiler to the require prototypes (explicit) and check
  2721. pointer types (just to be on the save side).  Guess what?  It compiled.  In
  2722. fact I couldn't get it to so much as WHINE about DoOpen UNLESS i removed
  2723. the #include <AppleEvents.h>.  Then it gets really huffy and complains
  2724. about a syntax error on the prototype (since AppleEvent is no longer
  2725. defined, it is to be expected).
  2726.  
  2727. So what is the solution?  Well, it is obvious that either there is
  2728. something else going on (that was deleted for brevity) or your compiler is
  2729. way out of whack.  I suggest you copy the above code and see if you can
  2730. compile it.  Let me know what you get, I am curious now as to how it worked
  2731. just fine for me and seems to blow up on you!
  2732.  
  2733. Good luck,
  2734.  
  2735. Lloyd
  2736.  
  2737.  
  2738. ----------------------------+------------------------------------
  2739. Lloyd Sargent               | "Podia est gamia" - Sherlock Holmes
  2740. Head Honcho                 | Internet:  canna@bga.com
  2741. Canna Software Development  | AOL:       lgsargent@aol.com
  2742. 14308-B FM 812              | Phone:     (512) 243-0283
  2743. Del Valle, Texas 78617      | Fax:       (512) 243-0283
  2744.  
  2745.     "My company believes in First Admendment rights. So there!"
  2746.  
  2747.  
  2748. >From udsugar@cerebrum.impaqt.drexel.edu 11 May 94 03:24:37 GMT
  2749. Path: ucivax!gateway
  2750. From: udsugar@cerebrum.impaqt.drexel.edu (Dave Sugar)
  2751. Subject: Re: Reading Serial Port?
  2752. Message-ID: <9405102024.aa28200@q2.ics.uci.edu>
  2753. Newsgroups: fa.think-c
  2754. X-Message-ID: <9405110324.AA11846@impaqt.drexel.edu>
  2755. Approved: usenet@q2.ics.uci.edu
  2756. Lines: 23
  2757. Date: 11 May 94 03:24:37 GMT
  2758.  
  2759.  
  2760.   Hmm, ok, seeing some of the responces maybe I can clarify my self just
  2761. a little bit more.  When I was trying to ioPosMode I did try both to
  2762. deliminate with a  '\r' and '\n' character.  They both seemed to work the
  2763. same in returning everything that was in the buffer.
  2764.  
  2765.   I have thought about making a second buffer that would just read in the
  2766. data and then I would read from that buffer to give the program what it
  2767. needs.  This seems like the easiest method right now, though I would like
  2768. to see if I can get the ioPosMode to work correctly.  It seems a little
  2769. easier.
  2770.  
  2771.   As for using the CommToolbox, again I thought of that, but the code that
  2772. I am writing is for an interface for a very specific machine.  There is
  2773. only going to be communication at a max of 9600 baud and of text data
  2774. only.  I don't think it would be worth delving into CommToolbox for this,
  2775. though I may be wrong, I should look into the book..
  2776.  
  2777.   Thanks for all the responces, more ary welcome.
  2778.   Dave Sugar
  2779.   udsugar@impat.drexel.edu
  2780.   udsugar@mcs.drexel.edu
  2781.  
  2782. >From canna@bga.com 11 May 94 14:13:34 GMT
  2783. Path: ucivax!gateway
  2784. From: canna@bga.com (Canna Software Development)
  2785. Subject: Re: AEInstallHandler Question.
  2786. Message-ID: <9405110713.aa01866@q2.ics.uci.edu>
  2787. Content-Type: text/plain; charset="us-ascii"
  2788. Mime-Version: 1.0
  2789. Newsgroups: fa.think-c
  2790. X-Message-ID: <199405111413.AA12466@zoom.bga.com>
  2791. Approved: usenet@q2.ics.uci.edu
  2792. Lines: 104
  2793. Date: 11 May 94 14:13:34 GMT
  2794.  
  2795. >Could anyone clue me in on why the following:
  2796. >
  2797. >/* function declarations ... */
  2798. >
  2799. >void         InitEventHandlers( void );
  2800. >pascal OSErr DoOpen( AppleEvent *theAppleEvent, AppleEvent *reply,
  2801. >                         long refCon);
  2802. >
  2803. >...
  2804. >
  2805. >void main (void)
  2806. >{
  2807. >   InitToolbox();
  2808. >   InitEventHandlers();
  2809. >   ...
  2810. >}
  2811. >
  2812. >void InitEventHandlers( void )
  2813. >{
  2814. >
  2815. > OSErr err;
  2816. >
  2817. > err = AEInstallEventHandler( kCoreEventClass, kAEOpenApplication,
  2818. >          DoOpen, 0L, false);
  2819. > ...
  2820. >}
  2821. >>
  2822. >pascal OSErr DoOpen( AppleEvent *theAppleEvent, AppleEvent *reply,
  2823. >          long refCon)
  2824. >{
  2825. > return noErr;
  2826. >}
  2827. >
  2828. >fails to compile claiming the third argument in my AEInstallEventHandler
  2829. >was not expected from the prototype?
  2830. >
  2831. >Yours,
  2832. >C Idiot Extroadinaire
  2833.  
  2834.  
  2835. Well, I took the above code (having messed with AppleEvents quite heavily
  2836. as of late) and compared it with my code. Nope. Couldn't see anything
  2837. obvious.  So I took the above code and stuffed it into a file named main.c.
  2838. Below is the code:
  2839.  
  2840. #include <AppleEvents.h>
  2841.  
  2842. /* function declarations ... */
  2843.  
  2844. void         InitEventHandlers( void );
  2845. pascal OSErr DoOpen( AppleEvent *theAppleEvent, AppleEvent *reply,
  2846.                          long refCon);
  2847.  
  2848.  
  2849. void main (void)
  2850. {
  2851. //   InitToolbox();
  2852.     InitEventHandlers();
  2853. }
  2854.  
  2855. void InitEventHandlers( void )
  2856. {
  2857.  
  2858.     OSErr err;
  2859.  
  2860.     err = AEInstallEventHandler( kCoreEventClass, kAEOpenApplication,
  2861.           DoOpen, 0L, false);
  2862. }
  2863.  
  2864. pascal OSErr DoOpen( AppleEvent *theAppleEvent, AppleEvent *reply,
  2865.           long refCon)
  2866. {
  2867.     return noErr;
  2868. }
  2869.  
  2870.  
  2871. I then set the compiler to the require prototypes (explicit) and check
  2872. pointer types (just to be on the save side).  Guess what?  It compiled.  In
  2873. fact I couldn't get it to so much as WHINE about DoOpen UNLESS i removed
  2874. the #include <AppleEvents.h>.  Then it gets really huffy and complains
  2875. about a syntax error on the prototype (since AppleEvent is no longer
  2876. defined, it is to be expected).
  2877.  
  2878. So what is the solution?  Well, it is obvious that either there is
  2879. something else going on (that was deleted for brevity) or your compiler is
  2880. way out of whack.  I suggest you copy the above code and see if you can
  2881. compile it.  Let me know what you get, I am curious now as to how it worked
  2882. just fine for me and seems to blow up on you!
  2883.  
  2884. Good luck,
  2885.  
  2886. Lloyd
  2887.  
  2888.  
  2889. ----------------------------+------------------------------------
  2890. Lloyd Sargent               | "Podia est gamia" - Sherlock Holmes
  2891. Head Honcho                 | Internet:  canna@bga.com
  2892. Canna Software Development  | AOL:       lgsargent@aol.com
  2893. 14308-B FM 812              | Phone:     (512) 243-0283
  2894. Del Valle, Texas 78617      | Fax:       (512) 243-0283
  2895.  
  2896.     "My company believes in First Admendment rights. So there!"
  2897.  
  2898.  
  2899. >From bernard@moet.cs.colorado.edu 11 May 94 17:22:37 GMT
  2900. Path: ucivax!gateway
  2901. From: bernard@moet.cs.colorado.edu (Bernie Bernstein)
  2902. Subject: anyone use ASLM?
  2903. X-Sender: bernard@sigi.cs.colorado.edu
  2904. Message-ID: <9405111022.aa12140@q2.ics.uci.edu>
  2905. Content-Type: text/plain; charset="us-ascii"
  2906. Mime-Version: 1.0
  2907. Newsgroups: fa.think-c
  2908. X-Message-ID: <199405111722.LAA14510@moet.cs.colorado.edu>
  2909. Approved: usenet@q2.ics.uci.edu
  2910. Lines: 16
  2911. Date: 11 May 94 17:22:37 GMT
  2912.  
  2913. I have been doing some work with the Apple Shared Library Manager, and now
  2914. I'm just looking for anyone else who has any experience with it. I haven't
  2915. tried compiling any Think C code with it yet, but it is supposed to be
  2916. possible. Is there anyone out there who has tried it?
  2917.  
  2918. Is it more of a hassle than just using it in MPW?
  2919.  
  2920. Thanks,
  2921.  
  2922.  
  2923.     o,  ,,   ,      | Bernie Bernstein                    | ,    ,,
  2924.     L>O/  `,/ `    ,| University of Colorado at Boulder   |/ `,,/  `
  2925.    O./  '  / . `, / | home: 303-444-3168                  |     / ` `  ,.
  2926.   ,/   /  ,      '  | email: bernard@cs.colorado.edu      | /        ''  `
  2927.  
  2928.  
  2929. >From blakeman@bnr.ca 11 May 94 18:29:04 GMT
  2930. Path: ucivax!gateway
  2931. From: blakeman@bnr.ca ("jim (j.) blakeman" )
  2932. Subject: unsubscribe request
  2933. X400-Originator: /dd.id=1625593/g=jim/i=j/s=blakeman/@bnr.ca
  2934. Content-Identifier: unsubscribe r...
  2935. Message-ID: <9405111129.aa16216@q2.ics.uci.edu>
  2936. Newsgroups: fa.think-c
  2937. X400-Received: 
  2938.  by mta bnr.ca in /PRMD=BNR/ADMD=TELECOM.CANADA/C=CA/; Relayed; Wed, 11 May 1994 14:28:34 -0400
  2939. X400-Received: 
  2940.  by /PRMD=BNR/ADMD=TELECOM.CANADA/C=CA/; Relayed; Wed, 11 May 1994 14:28:21 -0400
  2941. X400-Received: 
  2942.  by /PRMD=BNR/ADMD=TELECOM.CANADA/C=CA/; Relayed; Wed, 11 May 1994 14:26:00 -0400
  2943. X-Message-ID: <"2615 Wed May 11 14:28:25 1994"@bnr.ca>
  2944. Approved: usenet@q2.ics.uci.edu
  2945. X400-Content-Type: P2-1984 (2)
  2946. Lines: 2
  2947. Date: 11 May 94 18:29:04 GMT
  2948. X400-MTS-Identifier: 
  2949.  [/PRMD=BNR/ADMD=TELECOM.CANADA/C=CA/;bcars735.b.614:11.04.94.18.28.21]
  2950.  
  2951. unsubscribe blakeman@bnr.ca
  2952.  
  2953. >From jean-marie.laborde@imag.fr 11 May 94 19:08:14 GMT
  2954. Path: ucivax!gateway
  2955. From: jean-marie.laborde@imag.fr (Jean-Marie Laborde)
  2956. Subject: Bug in atan2()?
  2957. X-Sender: laborde@isis
  2958. Message-ID: <9405111208.aa19019@q2.ics.uci.edu>
  2959. Content-Type: text/plain; charset="us-ascii"
  2960. Mime-Version: 1.0
  2961. Newsgroups: fa.think-c
  2962. X-Message-ID: <199405111908.AA22252@isis.imag.fr>
  2963. Approved: usenet@q2.ics.uci.edu
  2964. Lines: 58
  2965. Date: 11 May 94 19:08:14 GMT
  2966.  
  2967. It "seems" that atan2, which has many advantages over atan(),
  2968. gives an erroneous answer when its second argument is exactly 0:
  2969.  
  2970. /****************************/
  2971. #include <math.h>
  2972. #define PI             3.14159265358979323846264
  2973. main()
  2974. {
  2975.     double  x=.0001,
  2976.             y=1.0,
  2977.             atp0001, atm0001, atp0, atm0,
  2978.             fact=PI/180;                  /* forcing result in degree */
  2979.  
  2980.      atp0001=atan2(y,x)/fact;
  2981.      atm0001=atan2(y,-x)/fact;
  2982.  
  2983.      x=.0;
  2984.      atp0=atan2(y,x)/fact;
  2985.      atm0=atan2(y,-x)/fact;
  2986.  
  2987.      printf(" %G %G %G %G", atp0001,atm0001,atp0,atm0);
  2988. }
  2989. /* output is:
  2990.    89.9943 90.0057 90 -90
  2991.      making atan2 a non continous function...
  2992.  
  2993.    89.9943 90.0057 90 90  would be expected!
  2994. */
  2995. /****************************/
  2996.  
  2997.  
  2998. /* Note: the source for atan2 in math.c ( copyright Symantec) is
  2999. double atan2(double y, double x)
  3000. {
  3001.         double z;
  3002.  
  3003.         DomainCheck(x == 0 && y == 0, 0);
  3004.         z = _atan(y / x);
  3005.         if (x < 0) {
  3006.                 if (y < 0)
  3007.                         z -= Pi;
  3008.                 else
  3009.                         z += Pi;
  3010.         }
  3011.         return(z);
  3012. }
  3013. It is no wonder that atan2(1,-0) will be evaluated as -PI/2 and not PI/2  */
  3014.  
  3015.  
  3016. ****************************************************************************
  3017. Jean-Marie Laborde                                       jean-marie.laborde@imag.fr
  3018. Responsable du Projet IMAG Cabri-geometre
  3019. Laboratoire de Structures Discretes et de Didactique - IMAG
  3020. Universite Joseph Fourier - CNRS          BP 53 38041 Grenoble cedex 9 FRANCE
  3021. (33) 76 51 46 10   (sec 76 51 46 16)      (fax 76 51 45 55)
  3022. ****************************************************************************
  3023.  
  3024.  
  3025. >From jcaufiel@cln.etc.bc.ca 11 May 94 20:25:21 GMT
  3026. Path: ucivax!gateway
  3027. From: jcaufiel@cln.etc.bc.ca (Brent Taylor)
  3028. Subject: Handling Save As... Command
  3029. Message-ID: <9405111325.aa23512@q2.ics.uci.edu>
  3030. Newsgroups: fa.think-c
  3031. X-Message-ID: <9405112029.AA26654@cln.etc.bc.ca>
  3032. Approved: usenet@q2.ics.uci.edu
  3033. Lines: 169
  3034. Date: 11 May 94 20:25:21 GMT
  3035.  
  3036. I am struggling in my efforts to develop an appropriate algorithm for
  3037. implementing the Save As... command from the File menu.  My source code
  3038. (portions omitted) is included below.
  3039.  
  3040. Some of my particular concerns are as follows:
  3041.  
  3042. 1. If after closing the previous file (assuming it exists), what do I do if
  3043. my attempt to create or open the new file fails?  What name should appear
  3044. in the window (old fsSpec.name, new fsSpec.name, "\pUntitled")?
  3045.  
  3046. 2. How do I handle errors from FSClose() when closing the previous file.
  3047. It seems that I should proceed to open the new file and save the window's
  3048. data, otherwise it can't be saved.  However, in what state does this leave
  3049. the old file?
  3050.  
  3051. 3. I would appreciate any comments on my error handling approach.  My
  3052. approach is to abort the process, clean up the mess, and report the error
  3053. at the first error encountered.
  3054.  
  3055.  
  3056. /************************** My source ***************************/
  3057.  
  3058. OSErr HandleSaveCommand(void);
  3059. OSErr HandleSaveAsCommand(void);
  3060. OSErr SaveDataFile(DataRecHandle myData);
  3061. OSErr SaveTempFile(FSSpecPtr tempSpec, DataRecHandle myData);
  3062. OSErr GetTempSpec(FSSpecPtr tempSpec);
  3063. OSErr SaveMyData(short fRefNum, DataRecHandle myData, long *fileLength);
  3064.  
  3065.  
  3066. /*
  3067.     HandleSaveCommand() handles the Save command from the File menu.
  3068. */
  3069. OSErr HandleSaveCommand()
  3070. {
  3071.     DataRecHandle  myData;
  3072.     OSErr          errNo;
  3073.  
  3074.     myData = (DataRecHandle) GetWRefCon(FrontWindow());
  3075.     if ((**myData).fRefNum == 0)
  3076.         errNo = HandleSaveAsCommand();
  3077.     else
  3078.         errNo = SaveDataFile(myData);
  3079.     return(errNo);
  3080. }
  3081.  
  3082.  
  3083. /*
  3084.         HandleSaveAsCommand() handles the Save As... command from the File menu.
  3085. */
  3086. OSErr HandleSaveAsCommand()
  3087. {
  3088.     WindowPtr          myWindow;
  3089.     DataRecHandle      myData;
  3090.     Str255             promptStr;
  3091.     Str255             nameStr;
  3092.     StandardFileReply  sfReply;
  3093.     OSErr              errNo;
  3094.  
  3095.     myWindow = FrontWindow();
  3096.     myData = (DataRecHandle) GetWRefCon(myWindow);
  3097.     GetIndString(promptStr, idMiscStr, iSaveAsStr);
  3098.     CopyString(nameStr, (**myData).dataSpec.name);
  3099.     if ((errNo = ResError()) == noErr) {
  3100.         StandardPutFile(promptStr, nameStr, &sfReply);
  3101.         if (sfReply.sfGood) {
  3102.             /* close the current file */
  3103.             if ((**myData).fRefNum != 0) {
  3104.                 FSClose((**myData).fRefNum);
  3105.                 (**myData).fRefNum = 0;
  3106.             }
  3107.  
  3108.             /* open the new file */
  3109.             if (sfReply.sfReplacing)
  3110.                 errNo = FSpCreate(&sfReply.sfFile, 'ROCK', 'Rock',
  3111.                                           smSystemScript);
  3112.             if (errNo == noErr)
  3113.                 if ((errNo = FSpOpenDF(&sfReply.sfFile,
  3114.                                           fsRdWrPerm, &fRefNum)) == noErr) {
  3115.                     (**myData).fRefNum = fRefNum;
  3116.                     (**myData).dataSpec = sfReply.sfFile;
  3117.                     SetWTitle(myWindow, sfReply.sfFile.name);
  3118.                     errNo = SaveDataFile(myData);
  3119.                 }
  3120.         } else
  3121.             errNo = userCanceledErr;
  3122.     }
  3123.     return(errNo);
  3124. }
  3125.  
  3126.  
  3127. /*
  3128.     SaveDataFile() saves the data file using the safe save method.
  3129. */
  3130. OSErr SaveDataFile(DataRecHandle myData)
  3131. {
  3132.     FSSpec  dataSpec;
  3133.     FSSpec  tempSpec;
  3134.     OSErr   errNo;
  3135.  
  3136.     dataSpec = (**myData).dataSpec;
  3137.     if ((errNo = GetTempSpec(&tempSpec)) == noErr)
  3138.       if ((errNo = FSpCreate(&tempSpec, 'ROCK', 'Rock',
  3139.                                                 smSystemScript)) == noErr) {
  3140.         if ((errNo = SaveTempFile(&tempSpec, myData)) == noErr)
  3141.           if ((errNo = FSpExchangeFiles(&tempSpec, &dataSpec)) == noErr)
  3142.             return(FSpDelete(&tempSpec));
  3143.         FSpDelete(&tempSpec);
  3144.       }
  3145.     return(errNo);
  3146. }
  3147.  
  3148.  
  3149. /*
  3150.     SaveTempFile() saves the data to the temporary file.
  3151. */
  3152. OSErr SaveTempFile(FSSpecPtr tempSpec, DataRecHandle myData)
  3153. {
  3154.     long    fileLength;
  3155.     short   fRefNum;
  3156.     OSErr   errNo;
  3157.  
  3158.     fileLength = 0;
  3159.     if ((errNo = FSpOpenDF(tempSpec, fsRdWrPerm, &fRefNum)) == noErr) {
  3160.       if ((errNo = SetFPos(fRefNum, fsFromStart, 0)) == noErr)
  3161.         if ((errNo = SaveMyData(fRefNum, myData, &fileLength)) == noErr)
  3162.           if ((errNo = SetEOF(fRefNum, fileLength)) == noErr)
  3163.             if ((errNo = GetVRefNum(fRefNum)) == noErr)
  3164.               if ((errNo = FlushVol(fRefNum)) == noErr) {
  3165.                 if ((errNo = FSClose(fRefNum)) == noErr)
  3166.                   (**myData).dirty = FALSE;
  3167.                 return(errNo);
  3168.               }
  3169.       FSClose(fRefNum);
  3170.     }
  3171.     return(errNo);
  3172. }
  3173.  
  3174.  
  3175. /*
  3176.     GetTempSpec() returns the file specification of a unique temporary file.
  3177. */
  3178. OSErr GetTempSpec(FSSpecPtr tempSpec)
  3179. {
  3180.     long    time;
  3181.     short   vRefNum;
  3182.     long    parID;
  3183.     Str255  name;
  3184.     OSErr   errNo;
  3185.  
  3186.     if ((errNo = FindFolder(fsSpec.vRefNum, kTemporaryFolderType,
  3187.                                 kCreateFolder, vRefNum, parID)) == noErr) {
  3188.         do {
  3189.             GetDateTime(&time);
  3190.             NumToString(time, name);
  3191.             errNo = FSMakeFSSpec(vRefNum, parID, name, tempSpec);
  3192.         } while (errNo == noErr);
  3193.         if (errNo == fnfErr)
  3194.             errNo = noErr;
  3195.     }
  3196.     return(errNo);
  3197. }
  3198.  
  3199.  
  3200. __________________________________________________________________________
  3201. Brent Taylor, Computer Science / Math Teacher         Phone: (604)865-4674
  3202. Elkford Secondary School                                Fax: (604)865-2915
  3203. Box 910, Elkford, BC, Canada  V0B 1H0               jcaufiel@cln.etc.bc.ca
  3204.  
  3205. >From warford@pepperdine.edu 11 May 94 22:40:22 GMT
  3206. Path: ucivax!gateway
  3207. From: warford@pepperdine.edu (Stan Warford)
  3208. Subject: Printing PostScript
  3209. Message-ID: <9405111540.aa01835@q2.ics.uci.edu>
  3210. X-Mailer: ELM [version 2.3 PL11]
  3211. Newsgroups: fa.think-c
  3212. X-Message-ID: <199405112242.AA20512@pepvax.pepperdine.edu>
  3213. Approved: usenet@q2.ics.uci.edu
  3214. Lines: 21
  3215. Date: 11 May 94 22:40:22 GMT
  3216.  
  3217. This may not be quite the right forum for this question, but does
  3218. anyone know of a Mac utility that will print a postscript file that
  3219. I recieved over the net.  I want to print it to my LaserWriter.
  3220. The beginning of the file looks like this:
  3221.  
  3222. --1073741863-633813925-758409756:#4036
  3223. Content-Type: APPLICATION/PostScript; name="po.ps"
  3224. Content-Transfer-Encoding: BASE64
  3225. Content-ID: <Pine.3.89.9401121636.A4036@world.std.com>
  3226. Content-Description: po.ps attached (56541 byte postscript file)
  3227.  
  3228. JSENCgQNCiUlQ29tbWVudDogVGhlIEN0cmwtRCBhYm92ZSBpcyB0byBlbnN1
  3229. cmUgam9icyB3b24ndCBqYW0NCiUlICBpbnNpZGUgdGhlIHByaW50ZXIgYW5k
  3230. IG1lc3MgdXAgdGhlIFZNIG1hbmFnZW1lbnQuDQovRHZpVG9QUyBzYXZlIGRl
  3231. Zg0KJSVDcmVhdGlvbkRhdGU6IFdlZCBKYW4gMTIgMTE6MjI6MTYgMTk5NA0K
  3232.  
  3233. and so on for about 1200 more lines.
  3234.  
  3235. Thanks
  3236. Stan Warford
  3237. warford@pepperdine.edu
  3238. >From clefort@unix1.sncc.lsu.edu 12 May 94 14:47:23 GMT
  3239. Path: ucivax!gateway
  3240. From: clefort@unix1.sncc.lsu.edu (Clinton R Lefort)
  3241. Subject: compiling 4.0 to 6.0 errors
  3242. Message-ID: <9405120747.aa24685@q2.ics.uci.edu>
  3243. Newsgroups: fa.think-c
  3244. X-Message-ID: <9405121338.AA25182@unix1.sncc.lsu.edu>
  3245. Approved: usenet@q2.ics.uci.edu
  3246. Lines: 41
  3247. Date: 12 May 94 14:47:23 GMT
  3248.  
  3249.  
  3250. Hello think-c'ers
  3251.  
  3252.  
  3253. Hello,   In a program that I am compiling  in THINK C 6.0, originally written in 4.0, I get these error messages during compilation time:
  3254.  
  3255.  
  3256. 1. File tc_files.c; Line 15
  3257. Error:   pointer types do not match
  3258.  
  3259. static  char *dSizeStr = "\psample-size";
  3260.  
  3261. 2.File aiff.c; Line 120
  3262. Error:   second argument to function write does not match prototype
  3263.           || write(fd, &comm1,sizCommChunk1) != sizCommChunk1
  3264.  
  3265. 3. File tc_cursor.c; Line 31
  3266. Error:   argument to function HNoPurge does not match prototype
  3267.         HNoPurge(&waitCursHand);
  3268.  
  3269. 4.File tc_misc.h; Line 2
  3270. Error:   invalid redefinition of macro TRUE
  3271. #define TRUE    (!FALSE)
  3272.  
  3273. 5. File tc_get_path.c; Line 57
  3274. Error:   invalid redeclaration of getHFSPath
  3275. OSErr getHFSPath(path,fname,vrefnum)
  3276.  
  3277. 6.File winmac.c; Line 149
  3278. Error:   third argument to function NewWindow does not match prototype
  3279.  
  3280.         csWindow = NewWindow(0L, &windowBounds, title, true, documentProc, -1L, true, 0);
  3281.  
  3282. There were over 16 bugs during compilation; I was able to fix 10 of them with my limited programming skills, and these are the remaining one.  I would appreciate any insights and helpful corrections.
  3283.  
  3284. Thank you
  3285.  
  3286. CRL
  3287.  
  3288. Please feel free to comment on any  of theabove as time warrants you!!!
  3289.  
  3290. >From egriffin@msmail4.hac.com 12 May 94 16:41:03 GMT
  3291. Path: ucivax!gateway
  3292. From: egriffin@msmail4.hac.com ("Griffin, Ed E")
  3293. Subject: RE:Printing Postscript
  3294. Message-ID: <9405120941.aa03775@q2.ics.uci.edu>
  3295. Newsgroups: fa.think-c
  3296. X-Message-ID: <9405121640.AA10820@hac2arpa.hac.com>
  3297. Approved: usenet@q2.ics.uci.edu
  3298. Lines: 15
  3299. Date: 12 May 94 16:41:03 GMT
  3300.  
  3301. Stan,
  3302.  
  3303.      Two things:
  3304.  
  3305. 1) It appears to me that the file has been encoded in some way.  PostScript,
  3306. by definition is a human readable language.  Your file may have been BinHexed
  3307. (did it have an extension like .hqx when you got it?)  If this is the case,
  3308. then you need to decode it before sending to the printer.
  3309.  
  3310. 2) You can get a great and free PS download program from Adobe!  It is called
  3311. PSTool and is available from ftp.adobe.com.  Its operation is self evident.
  3312.  
  3313.                            Hope this helps,
  3314.                            Ed Griffin
  3315.                            griffin@hac2arpa.hac.com
  3316. >From gurgle@netcom.com 12 May 94 16:46:55 GMT
  3317. Path: ucivax!gateway
  3318. From: gurgle@netcom.com (Pete Gontier)
  3319. Subject: Re: Handling Save As... Command
  3320. Message-ID: <9405120946.aa04278@q2.ics.uci.edu>
  3321. In-Reply-To: <9405111325.aa23512@q2.ics.uci.edu> from "Brent Taylor" at May 11, 94 08:25:21 pm
  3322. X-Mailer: ELM [version 2.4 PL23]
  3323. Content-Transfer-Encoding: 7bit
  3324. Content-Type: text/plain; charset=US-ASCII
  3325. Content-Length: 3192
  3326. MIME-Version: 1.0
  3327. Newsgroups: fa.think-c
  3328. X-Message-ID: <199405121646.JAA11029@netcom.com>
  3329. Approved: usenet@q2.ics.uci.edu
  3330. Lines: 63
  3331. Date: 12 May 94 16:46:55 GMT
  3332.  
  3333. Let me start by saying I am very pleased to hear someone in the universe
  3334. is taking error checking seriously.
  3335.  
  3336. > 1. If after closing the previous file (assuming it exists), what
  3337. > do I do if my attempt to create or open the new file fails? What
  3338. > name should appear in the window (old fsSpec.name, new fsSpec.name,
  3339. > "\pUntitled")?
  3340.  
  3341. Here's the tricky part: don't close the old file. You should design (or
  3342. rearrange) your routines so that they don't care which file they write
  3343. to. Then you can attempt to create, open, write, and close the new file
  3344. without disturbing the old one. After the new file is successfully
  3345. saved, *then* close the old one and change the window title. (In a
  3346. perfect world, you'd be able to [easily] check whether there was enough
  3347. memory to change the window title.) If an error occurs writing the new
  3348. file, you can just delete the new file, pretend the whole thing never
  3349. happened, and leave the document the way it was.
  3350.  
  3351. > 2. How do I handle errors from FSClose() when closing the previous
  3352. > file. It seems that I should proceed to open the new file and save the
  3353. > window's data, otherwise it can't be saved. However, in what state
  3354. > does this leave the old file?
  3355.  
  3356. Well, I think the previous answer handles most of these concerns.
  3357. However, there is the issue of what to do about a file that won't close.
  3358. If there were no buffering involved, I'd say to simply call DebugStr
  3359. if ever you get an error closing a file. Why? Because closing a file
  3360. *should* be a trivial operation that shouldn't fail unless your program
  3361. has a bug. However, closing a file in reality is not as trivial an
  3362. operation as one might like, because buffers have to be flushed, etc.
  3363. Does anybody out there have a good strategy?
  3364.  
  3365. > 3. I would appreciate any comments on my error handling approach. My
  3366. > approach is to abort the process, clean up the mess, and report the
  3367. > error at the first error encountered.
  3368.  
  3369. This seems reasonable in the general case; the tricky part is doing
  3370. things in the right sequence (as described above) so that you can safely
  3371. employ this tactic.
  3372.  
  3373. > OSErr GetTempSpec(FSSpecPtr tempSpec)
  3374.  
  3375. There is a problem in this routine. If it's called more than once in a
  3376. second, it will produce a duplicate filename. Also, if more than one
  3377. program uses this algorithm and a context switch occurs during that
  3378. second, it's possible two different programs could be competing for
  3379. access to the same file.
  3380.  
  3381. Rather than forcing this routine to last at least a second, which slows
  3382. down the system, and rather than using TickCount instead of GetDateTime,
  3383. since a 60th of a second can also be a surprisingly long time on a fast
  3384. machine, allow me to suggest you rely on another algorithm, possibly
  3385. one which empirically verifies the filename is unique by creating the
  3386. file with progressive filenames in some sort of loop until a file is
  3387. successfully created.
  3388.  
  3389. --
  3390.  Pete Gontier, CTO, Integer Poet Software; gurgle@netcom.com
  3391.  
  3392.  "...someone not acquainted with the Christian mythology of the
  3393.  Crucifixion might consider a Crucifix to be a particularly sadistic
  3394.  piece of erotica... We of the ACLU will continue to defend your right to
  3395.  worship such objects if it pleases you." -- Gregory J. Wageman
  3396. >From gurgle@netcom.com 12 May 94 16:59:20 GMT
  3397. Path: ucivax!gateway
  3398. From: gurgle@netcom.com (Pete Gontier)
  3399. Subject: Re: compiling 4.0 to 6.0 errors
  3400. Message-ID: <9405120959.aa05038@q2.ics.uci.edu>
  3401. In-Reply-To: <9405120747.aa24685@q2.ics.uci.edu> from "Clinton R Lefort" at May 12, 94 02:47:23 pm
  3402. X-Mailer: ELM [version 2.4 PL23]
  3403. Content-Transfer-Encoding: 7bit
  3404. Content-Type: text/plain; charset=US-ASCII
  3405. Content-Length: 2253
  3406. MIME-Version: 1.0
  3407. Newsgroups: fa.think-c
  3408. X-Message-ID: <199405121659.JAA12697@netcom.com>
  3409. Approved: usenet@q2.ics.uci.edu
  3410. Lines: 64
  3411. Date: 12 May 94 16:59:20 GMT
  3412.  
  3413. > 1. File tc_files.c; Line 15
  3414. > Error:   pointer types do not match
  3415. >
  3416. > static        char *dSizeStr = "\psample-size";
  3417.  
  3418. Pascal strings (note the "\p") are unsigned. The declaration (and
  3419. others like it) should read:
  3420.  
  3421.         static unsigned char *dSizeStr = "\psample-size";
  3422.  
  3423. > 2.File aiff.c; Line 120
  3424. > Error:   second argument to function write does not match prototype
  3425. >         || write(fd, &comm1,sizCommChunk1) != sizCommChunk1
  3426.  
  3427. Probably can't help you there; not enough context. However, I can guess
  3428. that the problem is that 'comm1' is not a (signed) character, which is
  3429. what 'write' expects.
  3430.  
  3431. > 3. File tc_cursor.c; Line 31
  3432. > Error:   argument to function HNoPurge does not match prototype
  3433. >       HNoPurge(&waitCursHand);
  3434.  
  3435. If 'waitCursHand' is a 'CursHandle', then you've just found a bug
  3436. lurking in this program which has been there for a while. If it's
  3437. a 'Handle', then the problem is the same but the fix is different.
  3438.  
  3439. CusrHandle  solution: 'HNoPurge ((Handle) waitCursHand);'
  3440. Handle      solution: 'HNoPurge (waitCursHand);'
  3441.  
  3442. If 'waitCursHand' is neither of the above things, you'll have to post
  3443. more context.
  3444.  
  3445. > 4.File tc_misc.h; Line 2
  3446. > Error:   invalid redefinition of macro TRUE
  3447. > #define TRUE  (!FALSE)
  3448.  
  3449. Just comment this buzzard out. It's a valid macro, but TRUE is already
  3450. defined in the standard headers.
  3451.  
  3452. > 5. File tc_get_path.c; Line 57
  3453. > Error:   invalid redeclaration of getHFSPath
  3454. > OSErr getHFSPath(path,fname,vrefnum)
  3455.  
  3456. That looks like an old-style declaration conflicting with a previously
  3457. declared prototype. Update the declaration to include type names and see
  3458. what happens.
  3459.  
  3460. > 6.File winmac.c; Line 149
  3461. > Error:   third argument to function NewWindow does not match prototype
  3462. >
  3463. >       csWindow = NewWindow(0L, &windowBounds, title, true, documentProc, -1L, true, 0);
  3464.  
  3465. Probably 'title' is a (signed) pointer to character. The best thing to
  3466. do would be to fix the declaration of 'title', but the program will
  3467. probably compile if you simply do:
  3468.  
  3469.    csWindow = NewWindow (0,&windowBounds,(StringPtr)title,true,
  3470.       documentProc,(WindowPtr)-1,true,0);
  3471.  
  3472. --
  3473.  Pete Gontier, CTO, Integer Poet Software; gurgle@netcom.com
  3474.  
  3475.  "Bedrock does support a form of drag and drop. Development dragged on
  3476.  for about two years, and then was dropped." -- Brian Clark
  3477. >From jcaufiel@cln.etc.bc.ca 12 May 94 17:42:18 GMT
  3478. Path: ucivax!gateway
  3479. From: jcaufiel@cln.etc.bc.ca (Brent Taylor)
  3480. Subject: DA's in System 7
  3481. Message-ID: <9405121042.aa07723@q2.ics.uci.edu>
  3482. Newsgroups: fa.think-c
  3483. X-Message-ID: <9405121746.AA03001@cln.etc.bc.ca>
  3484. Approved: usenet@q2.ics.uci.edu
  3485. Lines: 29
  3486. Date: 12 May 94 17:42:18 GMT
  3487.  
  3488. In System 7, is it possible for a desk accessory to be launched in the
  3489. application heap?  I seem to recall reading somewhere that a DA can be
  3490. launched into the application heap with the Command or the Option key or
  3491. something.
  3492.  
  3493. The real question:  Do I require the following code in a System 7 dependent
  3494. application?
  3495.  
  3496.  
  3497. /*
  3498.         HandleCloseCommand() handles the Close command from the File menu.
  3499. */
  3500. OSErr HandleCloseCommand(Boolean quitting)
  3501. {
  3502.         WindowPtr       theWindow;
  3503.         OSErr           errNo;
  3504.  
  3505.         theWindow = FrontWindow();
  3506.         if ((refNum = ((WindowPeek) theWindow)->windowKind) < 0)
  3507.                 CloseDeskAcc(refNum);
  3508.         else...
  3509. }
  3510.  
  3511.  
  3512. __________________________________________________________________________
  3513. Brent Taylor, Computer Science / Math Teacher         Phone: (604)865-4674
  3514. Elkford Secondary School                                Fax: (604)865-2915
  3515. Box 910, Elkford, BC, Canada  V0B 1H0               jcaufiel@cln.etc.bc.ca
  3516.  
  3517. >From gurgle@netcom.com 12 May 94 22:43:32 GMT
  3518. Path: ucivax!gateway
  3519. From: gurgle@netcom.com (Pete Gontier)
  3520. Subject: Re: DA's in System 7
  3521. Message-ID: <9405121543.aa28289@q2.ics.uci.edu>
  3522. In-Reply-To: <9405121042.aa07723@q2.ics.uci.edu> from "Brent Taylor" at May 12, 94 05:42:18 pm
  3523. X-Mailer: ELM [version 2.4 PL23]
  3524. Content-Transfer-Encoding: 7bit
  3525. Content-Type: text/plain; charset=US-ASCII
  3526. Content-Length: 2958
  3527. MIME-Version: 1.0
  3528. Newsgroups: fa.think-c
  3529. X-Message-ID: <199405122242.PAA29326@netcom.com>
  3530. Approved: usenet@q2.ics.uci.edu
  3531. Lines: 63
  3532. Date: 12 May 94 22:43:32 GMT
  3533.  
  3534. > In System 7, is it possible for a desk accessory to be launched in the
  3535. > application heap?  I seem to recall reading somewhere that a DA can be
  3536. > launched into the application heap with the Command or the Option key or
  3537. > something.
  3538.  
  3539. Yes and no. The option key trick no longer works. However, Desk
  3540. Accessories can still be installed into the app's resource fork and the
  3541. system will launch them into the application heap. You could assume
  3542. that anybody who installs a desk accessory into your app's resource
  3543. fork should get whatever punishment occurs when your programs fails to
  3544. accomodate the DA, but there are other considerations.
  3545.  
  3546. > The real question: Do I require the following code in a System 7
  3547. > dependent application?
  3548. >
  3549. > /*
  3550. >         HandleCloseCommand() handles the Close command from the File menu.
  3551. > */
  3552. > OSErr HandleCloseCommand(Boolean quitting)
  3553. > {
  3554. >         WindowPtr       theWindow;
  3555. >         OSErr           errNo;
  3556. >
  3557. >         theWindow = FrontWindow();
  3558. >         if ((refNum = ((WindowPeek) theWindow)->windowKind) < 0)
  3559. >                 CloseDeskAcc(refNum);
  3560. >         else...
  3561. > }
  3562.  
  3563. This is a good question. Let's assume that you want to punish people who
  3564. modify your app's resource fork by insalling a DA into it. There are
  3565. worse crimes in the world, but what the heck, you only live once. Under
  3566. this assumption, I'd say you could skip this business of checking the
  3567. windowKind field.
  3568.  
  3569. One the other hand, remember that a DA is a driver. DAs are allowed to
  3570. open windows not because they are DAs but because they are drivers --
  3571. drivers can open windows. Drivers are the super-set of DAs. Now, you
  3572. might think, why on earth would a driver that wasn't a DA want to open a
  3573. window? Well, consider a program like MultiClip. This is a clipboard and
  3574. scrapbook management utility. It's implemented partially in a driver,
  3575. not a DA, which opens a window. Its window shows up with a windowKind
  3576. less than 0. I can't remember precisely the details, but let's say it's
  3577. a hot-key sequence which causes MultiClip's driver to open its window.
  3578. No Apple Menu access needed.
  3579.  
  3580. Now you have this driver window in your app's window list, and it would
  3581. seem that the only thing to do is to call CloseDeskAcc against it.
  3582. But it's not a DA! Does CloseDeskAcc handle this situation? A cursory
  3583. disassmbly of CloseDeskAcc (Q800/Sys7.1) seems to indicate that it does
  3584. not handle this situation; it simply calls Close.
  3585.  
  3586. This is a good question. I had never thought about it before. In any
  3587. case, I don't think it's safe quite yet to completely ignore the
  3588. possibility that there will be a driver window in your window list.
  3589.  
  3590. --
  3591.  Pete Gontier, CTO, Integer Poet Software; gurgle@netcom.com
  3592.  
  3593.  'It seems the firm contracted by Intel to produce the famed "flying
  3594.  Pentium" ads could not complete the 3-D modeling on a PC before
  3595.  deadline. So in the best know-your-enemy tradition, they chose the next
  3596.  best thing -- a Quadra 840AV.'                 -- Mac The Knife 4/18/94
  3597. >From robert@rp.cam.org 13 May 94 01:50:26 GMT
  3598. Path: ucivax!gateway
  3599. From: robert@rp.cam.org (Robert Pellerin)
  3600. Subject: File name
  3601. Message-ID: <9405121850.aa07638@q2.ics.uci.edu>
  3602. X-Mailer: Eudora F1.4.2
  3603. Content-Type: text/plain; charset=us-ascii
  3604. Mime-Version: 1.0
  3605. Newsgroups: fa.think-c
  3606. X-Message-ID: <199405130150.AA20434@Altitude.CAM.ORG>
  3607. Approved: usenet@q2.ics.uci.edu
  3608. Lines: 24
  3609. Date: 13 May 94 01:50:26 GMT
  3610.  
  3611. I am learning C and working on my first program. So far I love C much
  3612. better than BASIC but I have to put a file mane in a DLOG static field.
  3613.  
  3614. I have a StandardFileReply (gSourceFile) in a global and need to put the
  3615. file name in a Str255.
  3616.  
  3617. The gSourceFile.sfFile.name is a Str63. How do I convert that in a Str255
  3618. so I'll be able to use: SetIText( iHandle, theFileName )?
  3619.  
  3620. Typecast to a Str255 doesn't work, and simply passing one pointer to the
  3621. ohter one give stranges results
  3622.  
  3623. It might look obvious for somebody, but mot for me.
  3624.  
  3625. Thanks!
  3626.  
  3627.  
  3628.  -------------------------------------------------------------
  3629.  * Robert Pellerin - Montreal, Qc Canada (robert@RP.CAM.ORG) *
  3630.  -------------------------------------------------------------
  3631.  *     res.: (514) 328-4726    *     BBS:  (514) 328-9028    *
  3632.  *     bur.:                   *     Programmation sur Mac   *
  3633.  *     fax.:                   *     ouvert 24 hres / jour   *
  3634.  
  3635. >From rsg@camtwh.eric.on.ca 13 May 94 02:06:04 GMT
  3636. Path: ucivax!gateway
  3637. From: rsg@camtwh.eric.on.ca (Reuben Gellman)
  3638. Subject: Address of hypercard newsgroup
  3639. Message-ID: <9405121906.aa08287@q2.ics.uci.edu>
  3640. X-Mailer: ELM [version 2.4 PL22]
  3641. Content-Transfer-Encoding: 7bit
  3642. Content-Type: text/plain; charset=US-ASCII
  3643. Content-Length: 245
  3644. MIME-Version: 1.0
  3645. Newsgroups: fa.think-c
  3646. X-Message-ID: <94May12.220612edt.74991@camtwh.eric.on.ca>
  3647. Approved: usenet@q2.ics.uci.edu
  3648. Lines: 8
  3649. Date: 13 May 94 02:06:04 GMT
  3650.  
  3651. Hello:
  3652. Anybody out there know the **address** of the (a?) hypercard discussion
  3653. group? (I mean e-mail address, not just usenet comp.sys.....hypercard.)
  3654. Feel free to save bandwidth & e-mail me directly (see below).
  3655.  
  3656. Reuben Gellman
  3657. rsg@eric.on.ca
  3658.  
  3659. >From lukas@iso.wwz.unibas.ch 13 May 94 08:14:52 GMT
  3660. Path: ucivax!gateway
  3661. From: lukas@iso.wwz.unibas.ch
  3662. Subject: Symantec C++ RISC Compiler
  3663. Message-ID: <9405130114.aa19872@q2.ics.uci.edu>
  3664. Newsgroups: fa.think-c
  3665. X-Message-ID: <9405130814.AA17233@iso.wwz.unibas.ch>
  3666. Approved: usenet@q2.ics.uci.edu
  3667. Lines: 5
  3668. X-Mts: smtp
  3669. Date: 13 May 94 08:14:52 GMT
  3670.  
  3671. Does anybody know something about the Symantec C++ compiler for Power-Mac's ?
  3672.  
  3673.  
  3674.                                 Lukas
  3675.  
  3676. >From zxmbt07@student.uni-tuebingen.de 13 May 94 11:51:39 GMT
  3677. Path: ucivax!gateway
  3678. From: zxmbt07@student.uni-tuebingen.de (Thomas Bridgwater)
  3679. Subject: Machine differences
  3680. Message-ID: <9405130451.aa09088@q2.ics.uci.edu>
  3681. X-Mailer: ELM [version 2.4 PL23]
  3682. Content-Type: text
  3683. Content-Length: 1182
  3684. Newsgroups: fa.think-c
  3685. Reply-To: tbridgwa@cymbal.aix.calpoly.edu
  3686. X-Message-ID: <9405131150.AA11628@student.uni-tuebingen.de>
  3687. Approved: usenet@q2.ics.uci.edu
  3688. Lines: 22
  3689. Date: 13 May 94 11:51:39 GMT
  3690.  
  3691. Hello --
  3692.  
  3693. I wrote a little program called 'Quiet Start' which shuts the volume to
  3694. 0 just before shut down and back to it's previous setting during the
  3695. INIT load. This forces some newer macs not to make the startup 'bong'.
  3696. Problem is, it doesn't have the desired effects on all macs. I realize
  3697. that there's nothing I can really do about it as the code that makes the
  3698. sound is executed from ROM before the INITs load, but I fugure I could
  3699. be nice and recognize when it's not going to work. Is there some sort of
  3700. list available that shows such details of the behaviour of various mac
  3701. models? Or, is there someone I can get free info from at Apple who can
  3702. tell me which macs do what? Another solution... I'm sure that the among
  3703. the readers of this list there are many different mac models available.
  3704. Would you mind checking what YOUR mac does by setting the volume to 0
  3705. and restarting. I'd like to know if the bong happens, and if so at what
  3706. volume level (i.e. some or all Quadras sound at level 7 if set to 0)
  3707.  
  3708. In addition, where can I get a current list of Mac models and the
  3709. appropriate machine specific Gestalt values?
  3710.  
  3711.      Thanks for your troubles --
  3712.            -- Tom Bridgwater
  3713. >From chrism@corp.cirrus.com 13 May 94 17:29:49 GMT
  3714. Path: ucivax!gateway
  3715. From: chrism@corp.cirrus.com (Chris Metcalfe)
  3716. Subject: Re:  Symantec C++ RISC Compiler
  3717. Message-ID: <9405131029.aa21956@q2.ics.uci.edu>
  3718. Newsgroups: fa.think-c
  3719. X-Message-ID: <9405131729.AA13323@tango.corp.cirrus.com>
  3720. Approved: usenet@q2.ics.uci.edu
  3721. Lines: 22
  3722. Date: 13 May 94 17:29:49 GMT
  3723.  
  3724. In the upgrade announcement that I received, Symantec offered a
  3725. "Power Macintosh Cross Development Kit":
  3726.  
  3727.         With this new add-in translator for Symentec C++ for
  3728.         Macintosh, you can compile your 68K Macintosh applications
  3729.         for Apple's new Power Macintosh.  Complete with FREE tools
  3730.         from Apple, the Cross Development kit provides the easiest
  3731.         migration of your programs to the Power Macintosh.
  3732.  
  3733.         Just $100*
  3734.  
  3735.         *Requires Symantec C++ 7.0 for Macintosh
  3736.  
  3737. So for a hundred dollars you get some free software!!  No mention
  3738. is made of any API extensions, so I assume the add-in module is
  3739. a script that simply translates a few application framework
  3740. conventions and toolbox calling conventions.  This means that
  3741. your code will be executing in the 68K emulation mode of the
  3742. PowerPC.
  3743.  
  3744. -- Chris Metcalfe
  3745.  
  3746. >From gurgle@netcom.com 13 May 94 19:39:09 GMT
  3747. Path: ucivax!gateway
  3748. From: gurgle@netcom.com (Pete Gontier)
  3749. Subject: Re: File name
  3750. Message-ID: <9405131239.aa29420@q2.ics.uci.edu>
  3751. In-Reply-To: <9405121850.aa07638@q2.ics.uci.edu> from "Robert Pellerin" at May 13, 94 01:50:26 am
  3752. X-Mailer: ELM [version 2.4 PL23]
  3753. Content-Transfer-Encoding: 7bit
  3754. Content-Type: text/plain; charset=US-ASCII
  3755. Content-Length: 1926
  3756. MIME-Version: 1.0
  3757. Newsgroups: fa.think-c
  3758. X-Message-ID: <199405131935.MAA21252@netcom.com>
  3759. Approved: usenet@q2.ics.uci.edu
  3760. Lines: 35
  3761. Date: 13 May 94 19:39:09 GMT
  3762.  
  3763. > The gSourceFile.sfFile.name is a Str63. How do I convert that in a
  3764. > Str255 so I'll be able to use: SetIText( iHandle, theFileName )?
  3765.  
  3766. The quick answer is that you don't. Both a Str63 and a Str255 are
  3767. generally Pascal strings. This means that the first byte holds the
  3768. number of subsequent bytes. So, for a Pascal string "\pfoo", the first
  3769. byte will be a 3. This definition of Pascal string is the only thing
  3770. that 'SetIText' cares about. You can pass 'gSourceFile.sfFile.name'
  3771. directly to 'SetIText'. From a code maintenance standpoint, it's
  3772. probably not the best thing to do, but at this stage of the game it's
  3773. probably not in your interest to worry overmuch about that.
  3774.  
  3775. There are several issues involved in why the compiler allows you to do
  3776. this. Note that 'Str63' and 'Str255' and the other StrXXX types are
  3777. defined simply as unsigned arrays of character. The trick is that when
  3778. it comes to function definitions and prototypes and calls, arrays don't
  3779. really exist. They're treated basically as pointers. When you desribe
  3780. or call a function interface which takes an array as a parameter,
  3781. think of the compiler passing only a pointer to the first element of
  3782. the array. In the situation we're discussing, that would be a pointer
  3783. to an unsigned character in the cases of both 'Str63' and 'Str255'.
  3784. So for function calls they're pretty much interchangeable as far as
  3785. the compiler is concerned. Any good C book covers this in far more
  3786. exhaustive detail than I have here.
  3787.  
  3788. You do have to know whether the function you are calling is assuming
  3789. that all 255 bytes are there. 'SetIText' only reads as many bytes as are
  3790. numbered by the first byte of the array, so it's safe to pass any Pascal
  3791. string, even a literal like "\pfoo".
  3792.  
  3793. --
  3794.  Pete Gontier, CTO, Integer Poet Software; gurgle@netcom.com
  3795.  
  3796.  "The human race will decree from time to time: 'There is something at
  3797.  which it is absolutely forbidden to laugh.'" -- Nietzche on C++
  3798. >From mxmora@unix.sri.com 13 May 94 20:24:48 GMT
  3799. Path: ucivax!gateway
  3800. From: mxmora@unix.sri.com (Matthew Xavier Mora)
  3801. Subject: Re:  Symantec C++ RISC Compiler
  3802. Message-ID: <9405131324.aa01357@q2.ics.uci.edu>
  3803. Content-Type: text/plain; charset="us-ascii"
  3804. Mime-Version: 1.0
  3805. Newsgroups: fa.think-c
  3806. X-Message-ID: <9405132026.AA11926@unix.sri.com>
  3807. Approved: usenet@q2.ics.uci.edu
  3808. Lines: 40
  3809. Date: 13 May 94 20:24:48 GMT
  3810.  
  3811. >In the upgrade announcement that I received, Symantec offered a
  3812. >"Power Macintosh Cross Development Kit":
  3813. >
  3814. >        With this new add-in translator for Symentec C++ for
  3815. >        Macintosh, you can compile your 68K Macintosh applications
  3816. >        for Apple's new Power Macintosh.  Complete with FREE tools
  3817. >        from Apple, the Cross Development kit provides the easiest
  3818. >        migration of your programs to the Power Macintosh.
  3819. >
  3820. >        Just $100*
  3821. >
  3822. >        *Requires Symantec C++ 7.0 for Macintosh
  3823. >
  3824. >So for a hundred dollars you get some free software!!  No mention
  3825. >is made of any API extensions, so I assume the add-in module is
  3826. >a script that simply translates a few application framework
  3827. >conventions and toolbox calling conventions.  This means that
  3828. >your code will be executing in the 68K emulation mode of the
  3829. >PowerPC.
  3830.  
  3831.  
  3832. Well I've been playing with it all morning and it does indeed create
  3833. native PowerPC. It works quite well amazingly enough. I'm trying to get a
  3834. program to work that uses stdio and its not cooperating but other programs
  3835. that I compiled worked without hassle. Its not as fast as MetroWorks but its
  3836. usable.
  3837.  
  3838. Matt
  3839.  
  3840.  
  3841. __________________________________________________________________
  3842. Matthew Xavier Mora  (cybernaut)            The keeper of the UMPG
  3843. SRI International                              mxmora@unix.sri.com
  3844. [Sent using Eudora 2.0.2       ]              Matt_Mora@QM.sri.com
  3845. [Using my brand new 8100/80av !]
  3846.  "Thanks to Apple Computers, it's Bitchin what these things can
  3847.   do." Tori Amos
  3848. __________________________________________________________________
  3849.  
  3850.  
  3851. >From siegel@netcom.com 13 May 94 20:40:05 GMT
  3852. Path: ucivax!gateway
  3853. From: siegel@netcom.com (Rich Siegel)
  3854. Subject: Re: Symantec C++ RISC Compiler
  3855. Message-ID: <9405131340.aa02182@q2.ics.uci.edu>
  3856. In-Reply-To: <9405131029.aa21956@q2.ics.uci.edu> from "Chris Metcalfe" at May 13, 94 05:29:49 pm
  3857. X-Mailer: ELM [version 2.4 PL23]
  3858. Content-Transfer-Encoding: 7bit
  3859. Content-Type: text/plain; charset=US-ASCII
  3860. Content-Length: 1679
  3861. MIME-Version: 1.0
  3862. Newsgroups: fa.think-c
  3863. X-Message-ID: <199405132039.NAA11556@netcom.com>
  3864. Approved: usenet@q2.ics.uci.edu
  3865. Lines: 40
  3866. Date: 13 May 94 20:40:05 GMT
  3867.  
  3868. >
  3869. > In the upgrade announcement that I received, Symantec offered a
  3870. > "Power Macintosh Cross Development Kit":
  3871. >
  3872. >       With this new add-in translator for Symentec C++ for
  3873. >       Macintosh, you can compile your 68K Macintosh applications
  3874. >       for Apple's new Power Macintosh.  Complete with FREE tools
  3875. >       from Apple, the Cross Development kit provides the easiest
  3876. >       migration of your programs to the Power Macintosh.
  3877. >
  3878. >       Just $100*
  3879. >
  3880. >       *Requires Symantec C++ 7.0 for Macintosh
  3881. >
  3882. > So for a hundred dollars you get some free software!!  No mention
  3883. > is made of any API extensions, so I assume the add-in module is
  3884. > a script that simply translates a few application framework
  3885. > conventions and toolbox calling conventions.  This means that
  3886. > your code will be executing in the 68K emulation mode of the
  3887. > PowerPC.
  3888.  
  3889. With all due respect, you're wrong.
  3890.  
  3891. The add-in translator is, in fact, a translator, just like the C, C++,
  3892. and Rez compilers. It's a C++ compiler which uses the same front-end
  3893. code as the 7.0 C++ compiler, and whose back end emits PowerPC code,
  3894. which is packaged in the XCOFF format. The "free tools" that are
  3895. supplied are the necessary Apple tools which are necessary to build a
  3896. working application from XCOFF files: PPCLink, MakePEF, MakeSYM, and
  3897. others. (A couple of other tools are supplied as well, but aren't
  3898. relevant to this discussion.)
  3899.  
  3900. Applications built with the cross-development kit are real live
  3901. PowerPC executables, not emulated. The CDK also includes universal
  3902. headers (though they may already be a part of the paid 7.0 upgrade - I
  3903. don't recall for certain), and native versions of the standard C and
  3904. C++ libraries and Mac OS and Toolbox glue.
  3905.  
  3906. R.
  3907.  
  3908. >From Brian.Bezanson@macsrv.mgi.com 13 May 94 20:55:47 GMT
  3909. Path: ucivax!gateway
  3910. From: Brian.Bezanson@macsrv.mgi.com (Brian Bezanson)
  3911. Subject: RE>Re:  Symantec C++ RISC Compiler
  3912. Message-ID: <9405131355.aa02909@q2.ics.uci.edu>
  3913. X-Mailer: InterCon Dispatcher/SMTP for QuickMail
  3914. Newsgroups: fa.think-c
  3915. X-Message-ID: <199405131556188855@macsrv.mgi.com>
  3916. Approved: usenet@q2.ics.uci.edu
  3917. X-Priority: 4
  3918. Lines: 25
  3919. Date: 13 May 94 20:55:47 GMT
  3920.  
  3921. Date    5/13/94
  3922. Subject RE>Re-  Symantec C++ RISC C
  3923. From    Brian Bezanson
  3924. To      Chris Metcalfe, think-c
  3925.  
  3926.         Reply to:   RE>Re:  Symantec C++ RISC Compiler
  3927. I have the PowerPC Symantec Kit. The "FREE" stuff is the Apple Linker and
  3928. Debugger for PowerPC. You uses a different translator, instead of "Symantec C++
  3929. " you use something like "Symantec PowerPC C++" to compile your code.
  3930.  
  3931. Nothing runs in Emulation unless you call something or use a code fragment
  3932. that is emulated.
  3933.  
  3934. Brian
  3935.  
  3936. ====
  3937. Brian R Bezanson                      Phone: +1 612 854 1220
  3938. Management Graphics, Inc.             Fax:   +1 612 851 6159
  3939. 1401 E 79th Street                    internet: bezanson@mgi.com
  3940. Minneapolis, MN 55425                 AppleLink: BEZANSON
  3941.  
  3942.  
  3943.  
  3944.  
  3945.  
  3946. >From whusain@k12.az.us 13 May 94 22:29:44 GMT
  3947. Path: ucivax!gateway
  3948. From: whusain@k12.az.us (Will Glass-Husain)
  3949. Subject: what's the deal with version 7.0
  3950. Message-ID: <9405131529.aa08069@q2.ics.uci.edu>
  3951. Content-Type: TEXT/PLAIN; charset=US-ASCII
  3952. content-length: 0
  3953. Mime-Version: 1.0
  3954. Newsgroups: fa.think-c
  3955. X-Message-ID: <Pine.3.89.9405131423.A12813-0100000@azedlink1.ade.state.az.us>
  3956. Approved: usenet@q2.ics.uci.edu
  3957. Lines: 4
  3958. Date: 13 May 94 22:29:44 GMT
  3959.  
  3960.  
  3961. Has anyone heard anything about version 7.0 of Think C?
  3962.  
  3963. -->Will Glass-Husain
  3964. >From gurgle@netcom.com 14 May 94 04:41:46 GMT
  3965. Path: ucivax!gateway
  3966. From: gurgle@netcom.com (Pete Gontier)
  3967. Subject: Re: what's the deal with version 7.0
  3968. Message-ID: <9405132141.aa19131@q2.ics.uci.edu>
  3969. In-Reply-To: <9405131529.aa08069@q2.ics.uci.edu> from "Will Glass-Husain" at May 13, 94 10:29:44 pm
  3970. X-Mailer: ELM [version 2.4 PL23]
  3971. Content-Transfer-Encoding: 7bit
  3972. Content-Type: text/plain; charset=US-ASCII
  3973. Content-Length: 385
  3974. MIME-Version: 1.0
  3975. Newsgroups: fa.think-c
  3976. X-Message-ID: <199405140441.VAA25211@netcom.com>
  3977. Approved: usenet@q2.ics.uci.edu
  3978. Lines: 11
  3979. Date: 14 May 94 04:41:46 GMT
  3980.  
  3981. > Has anyone heard anything about version 7.0 of Think C?
  3982.  
  3983. It's still the same old reliable Kahl compiler from the 5 era. Still
  3984. great, if you're satisfied with Object C. :-)
  3985.  
  3986. --
  3987.  Pete Gontier, CTO, Integer Poet Software; gurgle@netcom.com
  3988.  
  3989.  C   credo: "Trust the programmer."
  3990.  C++ credo: "Put the muzzle of a shotgun in your mouth and
  3991.              give the programmer the trigger..."
  3992. >From KWAKVXA@grove.iup.edu 14 May 94 20:54:50 GMT
  3993. Path: ucivax!gateway
  3994. From: KWAKVXA@grove.iup.edu
  3995. Subject: I is outta here
  3996. Message-ID: <9405141354.aa22213@q2.ics.uci.edu>
  3997. Content-transfer-encoding: 7BIT
  3998. Content-type: TEXT/PLAIN; CHARSET=US-ASCII
  3999. MIME-version: 1.0
  4000. Newsgroups: fa.think-c
  4001. X-Message-ID: <01HCAL2MB5468Y77TN@grove.iup.edu>
  4002. Organization: Indiana University of Pennsylvania
  4003. X-VMS-To: NETMAIL%"think-c@ics.uci.edu"
  4004. Approved: usenet@q2.ics.uci.edu
  4005. Lines: 6
  4006. Date: 14 May 94 20:54:50 GMT
  4007. X-Envelope-to: think-c@ics.uci.edu
  4008.  
  4009.  
  4010. Please remove me from this list.
  4011.  
  4012. Sorry if this is the wrong way to do this.
  4013.  
  4014. Jeff Bertrand
  4015. >From mauricio@mozart.aero.ufl.edu 15 May 94 02:35:28 GMT
  4016. Path: ucivax!gateway
  4017. From: mauricio@mozart.aero.ufl.edu (Mauricio Tavares)
  4018. Subject: Reading data from a file
  4019. Message-ID: <9405141935.aa29590@q2.ics.uci.edu>
  4020. X-Mailer: ELM [version 2.3 PL2]
  4021. Newsgroups: fa.think-c
  4022. X-Message-ID: <9405150235.AA12526@mozart.aero.ufl.edu>
  4023. Approved: usenet@q2.ics.uci.edu
  4024. Lines: 9
  4025. Date: 15 May 94 02:35:28 GMT
  4026.  
  4027.         For a code I am writing, some configuration parameters are in a
  4028. text file that is read by the program.  What I would be doing is reading
  4029. some doubles and integers and strings into a struct.  I know how to do that
  4030. using the standard C routines (fopen(), fscanf(), and so on), but how can I
  4031. do that using the Mac file routines?
  4032.  
  4033. If someone wants me to be more precise, I can upload my standard C version
  4034. of the code.
  4035.  
  4036. >From gurgle@netcom.com 15 May 94 15:54:22 GMT
  4037. Path: ucivax!gateway
  4038. From: gurgle@netcom.com (Pete Gontier)
  4039. Subject: Re: Reading data from a file
  4040. Message-ID: <9405150854.aa28783@q2.ics.uci.edu>
  4041. In-Reply-To: <9405141935.aa29590@q2.ics.uci.edu> from "Mauricio Tavares" at May 15, 94 02:35:28 am
  4042. X-Mailer: ELM [version 2.4 PL23]
  4043. Content-Transfer-Encoding: 7bit
  4044. Content-Type: text/plain; charset=US-ASCII
  4045. Content-Length: 2465
  4046. MIME-Version: 1.0
  4047. Newsgroups: fa.think-c
  4048. X-Message-ID: <199405151554.IAA28831@netcom.com>
  4049. Approved: usenet@q2.ics.uci.edu
  4050. Lines: 44
  4051. Date: 15 May 94 15:54:22 GMT
  4052.  
  4053. > reading some doubles and integers and strings into a struct.
  4054.  
  4055. This turns out to be non-trivial. You wouldn't think so to look at the
  4056. facilities supported by most languages, but there's a reason almost
  4057. every language has those facilities. Text files are actually pretty
  4058. tedious (if not difficult) to read in a robust manner.
  4059.  
  4060.    (Standard C file i/o totally fails in the robsutness department --
  4061.    try reading a float into an integer and see what happens. I wouldn't
  4062.    use those calls unless I could guarantee that a human would never
  4063.    touch the files. And if that's the case, a lot of the reasons for
  4064.    text files go out the window.)
  4065.  
  4066. The basic idea is that you read everything in as strings first, then
  4067. convert the strings to numbers. You start with strings because you
  4068. (probably) want to eliminate the white space around each number. What
  4069. I have done in the past is write a routine which will read the file up
  4070. to a maximum number of bytes, and I pass it a maximum of 30 because I
  4071. know 30 is bigger than the number of digits in any numeral (as opposed
  4072. to number) I will want to read. This routine is called by one of a
  4073. set of routines which expect to read a short or a long or a float
  4074. or whatever. The second routine analyzes what it got from the first
  4075. routine to eliminate the white space, and resets the file pointer to one
  4076. position beyond the end of the numeral. (After reading 30 bytes, the
  4077. file pointer is probably positioned well beyond the end of the numeral.)
  4078. Then it calls another routine to convert the string to a number.
  4079. For simple cases, StringToNum will work (but is slow, since it is a
  4080. trap). There are also some SANE (library only?) calls which should
  4081. help you. Optimally, you should be WorldScript-savvy when you do these
  4082. conversions, but that may be beyond the scope of your program.
  4083.  
  4084. This is basically a slow method, but there are any number of ways to
  4085. enhance its performance. Double-buffering your file i/o helps a lot.
  4086. Reading one byte at a time until you encounter a non-digit is definitely
  4087. slower. Combining the two techniques is faster than the technique I
  4088. outlined above, but slower than simply adding double-buffering to the
  4089. technique I outlined above.
  4090.  
  4091. --
  4092.  Pete Gontier, CTO, Integer Poet Software; gurgle@netcom.com
  4093.  
  4094.  '"We believe the customer goes to retail stores to buy Microsoft
  4095.  software," said Ed Belleba, director of retail strategy at Microsoft.'
  4096.                                                      -- MacWEEK 4/18/94
  4097. >From pindar3@cix.compulink.co.uk 16 May 94 09:32:57 GMT
  4098. Path: ucivax!gateway
  4099. From: pindar3@cix.compulink.co.uk (Pindar Infotek Ltd)
  4100. Subject: Choosing a folder with Cust
  4101. Message-ID: <9405160232.aa23400@q2.ics.uci.edu>
  4102. Newsgroups: fa.think-c
  4103. Reply-To: pindar3@cix.compulink.co.uk
  4104. X-Message-ID: <memo.122588@cix.compulink.co.uk>
  4105. Approved: usenet@q2.ics.uci.edu
  4106. Lines: 93
  4107. Date: 16 May 94 09:32:57 GMT
  4108.  
  4109.  
  4110. >From Pindar user Ian McCall
  4111.  
  4112. Subject: _Choosing a folder with CustomGetFile
  4113. I've put together a couple of routines wich allow the user to select
  4114. a folder using a GetFile dialogue box. However, weird effects are
  4115. being experienced on certain Macintoshes.
  4116.  
  4117. What's happening is that should a user click on any folder in the
  4118. list, the selection bar resets itself to the top of the list again -
  4119. in effect give a 'springloaded' look to the whole thing.
  4120.  
  4121. This bug is intermittent on some Macintoshes, and non-existent on the
  4122. others (the majority). Unfortunately, my development Mac is one where
  4123. the problem never occurrs so I'm finding it very difficult to track
  4124. the problem down.
  4125.  
  4126. Since the file filter I've passed to CustomGetFile works (only
  4127. directories are shown), and since CustomGetFile is simply a Toolbox
  4128. call, I believe the problem would be in my modal dialogue event
  4129. filter.
  4130.  
  4131. Here's the code. The values 'ChooseCurrentFolder' and
  4132. 'ChooseSelectedFolder' are contants referring to dialogue items.
  4133.  
  4134.  
  4135. pascal short SelectOnlyFoldersDialogueHook(short whichItem,
  4136.                       DialogPtr theDialogue, void *theData)
  4137. {
  4138.    static Boolean   selectButtonState = TRUE;
  4139.    Handle           itemHandle;
  4140.    short            itemType;
  4141.    Rect             itemRect;
  4142.  
  4143.  
  4144.    if(GetWRefCon(theDialogue) == sfMainDialogRefCon)
  4145.    {
  4146.       switch(whichItem)
  4147.       {
  4148.          case sfHookNullEvent:
  4149.             if((EqualString(theData, "\p", FALSE, FALSE))
  4150.              && selectButtonState)
  4151.             {
  4152.                GetDItem(theDialogue, ChooseSelectedFolder,
  4153.                                &itemType, &itemHandle, &itemRect);
  4154.                HiliteControl((ControlHandle)itemHandle, 255);
  4155.                selectButtonState = FALSE;
  4156.             }
  4157.             else if((!(EqualString(theData, "\p", FALSE, FALSE)))
  4158.                                         && (!(selectButtonState)))
  4159.             {
  4160.                GetDItem(theDialogue, ChooseSelectedFolder,
  4161.                                &itemType, &itemHandle, &itemRect);
  4162.                HiliteControl((ControlHandle)itemHandle, 0);
  4163.                selectButtonState = TRUE;
  4164.             }
  4165.          break;
  4166.  
  4167.          case ChooseCurrentFolder:
  4168.             fsCurrentFolderSelected = TRUE;
  4169.             return(sfItemOpenButton);
  4170.          break;
  4171.  
  4172.          case ChooseSelectedFolder:
  4173.             return(sfItemOpenButton);
  4174.          break;
  4175.  
  4176.          default:
  4177.             return(whichItem);
  4178.          break;
  4179.       }
  4180.    }
  4181. }
  4182.  
  4183.  
  4184. Sorry about the length of that - the original's stuffer with comments
  4185. too which makes it even longer.
  4186.  
  4187. Now - as far as I can see I am at no stage interfering with the
  4188. actual selection, which means I'm at a loss to explain the bug. Could
  4189. it be a Macintosh Toolbox problem, or is it (more likely) my fault
  4190. after all?
  4191.  
  4192.  
  4193. Cheers,
  4194.       Ian
  4195.  
  4196.  
  4197.  
  4198. ---
  4199. Please make 'Attn:<space>Ian McCall' the first line of your reply
  4200. (not the subject) to ensure automatic forwarding to the correct
  4201. Pindar user.
  4202. >From pindar3@cix.compulink.co.uk 16 May 94 13:32:26 GMT
  4203. Path: ucivax!gateway
  4204. From: pindar3@cix.compulink.co.uk (Pindar Infotek Ltd)
  4205. Subject: strncmp
  4206. Message-ID: <9405160632.aa13401@q2.ics.uci.edu>
  4207. Newsgroups: fa.think-c
  4208. Reply-To: pindar3@cix.compulink.co.uk
  4209. X-Message-ID: <memo.124323@cix.compulink.co.uk>
  4210. Approved: usenet@q2.ics.uci.edu
  4211. Lines: 28
  4212. Date: 16 May 94 13:32:26 GMT
  4213.  
  4214.  
  4215. >From Pindar user Ian McCall
  4216.  
  4217. Subject: _strncmp
  4218. Has anyone had any trouble with 'strncmp' in THINK C7? I don't know
  4219. about earlier versions, but under 7 the call
  4220.  
  4221.    strncmp((char *)"Jefferson", (char *)"Jef", (size_t)3)
  4222.  
  4223. (taken from the THINK Reference example) returns a result of 1. From
  4224. empirical testing, strncmp seems to be returning whether one string
  4225. is larger than another, and not correctly comparing characters.
  4226.  
  4227. I may not be the world's greatest Mac wizard, but I -am- aware of how
  4228. to use calls such as strncmp!
  4229.  
  4230. Any clues?
  4231.  
  4232.  
  4233. Cheers,
  4234.        Ian
  4235.  
  4236.  
  4237.  
  4238. ---
  4239. Please make 'Attn:<space>Ian McCall' the first line of your reply
  4240. (not the subject) to ensure automatic forwarding to the correct
  4241. Pindar user.
  4242. >From nagel@ics.uci.edu 16 May 94 17:51:51 GMT
  4243. Path: ucivax!gateway
  4244. From: nagel@ics.uci.edu (Mark Nagel)
  4245. Subject: ADMIN: bounced mail messages
  4246. Message-ID: <9405161051.aa25336@q2.ics.uci.edu>
  4247. Newsgroups: fa.think-c
  4248. Reply-To: think-c-request@ics.uci.edu
  4249. X-Message-ID: <25318.769110690@ics.uci.edu>
  4250. Approved: usenet@q2.ics.uci.edu
  4251. Lines: 10
  4252. Date: 16 May 94 17:51:51 GMT
  4253.  
  4254. If anyone on the list receives a bounce message because a member
  4255. delivery fails, please send a message to
  4256. think-c-request@ics.uci.edu.  The problem is usually due to an
  4257. incorrectly configured mail system at the delivery site, and I have
  4258. no way of knowing unless I'm told by one of you.  I already know
  4259. about the problems at powershare.itd.umich.edu, so no need to alert
  4260. me on that one, but if you receive any others, please let me know...
  4261.  
  4262. Thanks,
  4263. Mark
  4264. >From warford@pepperdine.edu 16 May 94 20:28:39 GMT
  4265. Path: ucivax!gateway
  4266. From: warford@pepperdine.edu (Stan Warford)
  4267. Subject: Thanx for PS tip
  4268. Message-ID: <9405161328.aa04865@q2.ics.uci.edu>
  4269. X-Mailer: ELM [version 2.3 PL11]
  4270. Newsgroups: fa.think-c
  4271. X-Message-ID: <199405162030.AA14564@pepvax.pepperdine.edu>
  4272. Approved: usenet@q2.ics.uci.edu
  4273. Lines: 17
  4274. Date: 16 May 94 20:28:39 GMT
  4275.  
  4276. Thanks to:
  4277.  
  4278. Danny Thomas, Don Gillaspie, Alex Knight, Matthew E. Shafer
  4279. Vince Paragano, L Sargent, Jim Wintermyre, WCR@KNOX.BITNET,
  4280. Donald R. Fredkin, Alan D., Greg Vaughn, Barry_Wolman,
  4281. Dana S Emery, Robert S. Mah, Griffin, Ed E, Joshua Kuperman
  4282.  
  4283. for helping me solve my postscript printing problem.  As several
  4284. pointed out, the file was attached to an email message that required
  4285. a MIME compatible mail reader.  I discovered our local pine mailer,
  4286. which is MIME compatible and was able to decode the BASE64 attached
  4287. file, and print it with drop*PS, a utility that several suggested
  4288. I could find on sumex.  Worked great.  Thanks for the tips.
  4289.  
  4290. Stan Warford
  4291. warford@pepperdine.edu
  4292.  
  4293. >From abarne1@gl.umbc.edu 17 May 94 01:02:34 GMT
  4294. Path: ucivax!gateway
  4295. From: abarne1@gl.umbc.edu (barnett aaron)
  4296. Subject: #include problems
  4297. Message-ID: <9405161802.aa19924@q2.ics.uci.edu>
  4298. Newsgroups: fa.think-c
  4299. X-Message-ID: <199405170102.VAA27255@umbc8.umbc.edu>
  4300. Approved: usenet@q2.ics.uci.edu
  4301. Lines: 31
  4302. Date: 17 May 94 01:02:34 GMT
  4303.  
  4304. im getting a syntax error when i include a certain
  4305. header file more than once.
  4306. ive got all the #ifndef stuff in.
  4307. the error happens in a typdef statement.
  4308. the header is sort of like this:
  4309.  
  4310.  #ifndef HEADER_H
  4311.  #define HEADER_H
  4312.  
  4313.  #include <systemFoo.h>
  4314.  #include "localFoo.h"
  4315.  
  4316.  typedef struct
  4317.  {
  4318.    int stuff;               <-syntax error
  4319.    void *moreStuff;
  4320.  } aThing;
  4321.  
  4322.  extern int anInteger;
  4323.  
  4324.  void aProtoType(void);
  4325.  
  4326.  #endif /* HEADER_H */
  4327.  
  4328. so...
  4329. what do you think?
  4330.  
  4331.  
  4332. \.
  4333. aaron <abarne1@gl.umbc.edu>
  4334. "It's a safety mechanism, the mind shuts off."
  4335. >From Mhteas@aol.com 17 May 94 01:42:37 GMT
  4336. Path: ucivax!gateway
  4337. From: Mhteas@aol.com
  4338. Subject: Re: Reading data from a file.
  4339. Message-ID: <9405161842.aa21524@q2.ics.uci.edu>
  4340. X-Mailer: America Online Mailer
  4341. Newsgroups: fa.think-c
  4342. X-Message-ID: <9405162142.tn174063@aol.com>
  4343. Approved: usenet@q2.ics.uci.edu
  4344. Lines: 25
  4345. Date: 17 May 94 01:42:37 GMT
  4346.  
  4347.  
  4348. >What I would be doing is reading
  4349. >some doubles and integers and strings into a struct.  I know how >to do that
  4350. >using the standard C routines (fopen(), fscanf(), and so on), >but how can I
  4351. >do that using the Mac file routines?
  4352.  
  4353. You can do this, I do it myself.  The UNIX-style routines (fopen(), etc) need
  4354. to be replaced with the Mac-style calls.  I'd suggest the FspXXX calls, but
  4355. the FSXXX calls will work fine too.
  4356.  
  4357. The Mac calls will read and write data in the same way the UNIX-style calls
  4358. will. In fact, on the Mac, the UNIX-style calls are implemented with the Mac
  4359. calls.  You'll use FSRead(), and FSWrite() to read and write data and
  4360. corresponding calls to open and close.  See the File Manager chapters of
  4361. Inside Mac for more details on the calls.
  4362.  
  4363. For configuration parameters you may want to consider a resource.  This is
  4364. usually a natural thing to write or read a struct from.  Information on doing
  4365. this is in the Resource Manager chapter of Inside Mac.
  4366.  
  4367. Malcolm Teas
  4368. "Relax, it's only ones and zeros..."
  4369. Teas Technology - Custom software for the Mac and Newton.
  4370. Internet: "mhteas@aol.com" AppleLink or AOL: "mhteas"
  4371.  
  4372. >From jaho@secrc.abb.se 17 May 94 09:53:39 GMT
  4373. Path: ucivax!gateway
  4374. From: jaho@secrc.abb.se (Jan Hoeglund - ABB Corporate Research Sweden)
  4375. Subject: C programming style
  4376. Message-ID: <9405170253.aa12419@q2.ics.uci.edu>
  4377. Newsgroups: fa.think-c
  4378. X-Message-ID: <9405170953.AA22423@keb11.secrc.abb.se>
  4379. Approved: usenet@q2.ics.uci.edu
  4380. Lines: 11
  4381. Date: 17 May 94 09:53:39 GMT
  4382.  
  4383. >From my experience, disagreements over programming style have been
  4384. a primary obstacle to teams attempting to work closely together.
  4385. One problem is indentation and brace placement because it greatly
  4386. changes the appearance of the code. Careful visual layout of the
  4387. code is important. It makes the difference between a program that
  4388. anyone can read and one that everyone want to rewrite.
  4389. Are there any C programming style guidelines out there? Any books?
  4390.  
  4391. Jan Hoeglund
  4392. jaho@secrc.abb.se
  4393. >From pindar3@cix.compulink.co.uk 17 May 94 11:03:42 GMT
  4394. Path: ucivax!gateway
  4395. From: pindar3@cix.compulink.co.uk (Pindar Infotek Ltd)
  4396. Subject: List Manager
  4397. Message-ID: <9405170403.aa17149@q2.ics.uci.edu>
  4398. Newsgroups: fa.think-c
  4399. Reply-To: pindar3@cix.compulink.co.uk
  4400. X-Message-ID: <memo.133675@cix.compulink.co.uk>
  4401. Approved: usenet@q2.ics.uci.edu
  4402. Lines: 25
  4403. Date: 17 May 94 11:03:42 GMT
  4404.  
  4405.  
  4406. >From Pindar user Ian McCall
  4407.  
  4408. Subject: _List Manager
  4409. How do I stop the List Manager from compressing text when displaying
  4410. a list?
  4411.  
  4412. I've got data which is sometimes slightly too long to fit in the cell
  4413. size I've given, and the List Manager is trying to be helpful by
  4414. changing the character spacing and making it fit. Trouble is, I'm
  4415. trying to make things line up consistently and this helpfulness is
  4416. getting in the way...
  4417.  
  4418. Thanks in advance for any information.
  4419.  
  4420.  
  4421. Cheers,
  4422.        Ian
  4423.  
  4424.  
  4425.  
  4426. ---
  4427. Please make 'Attn:<space>Ian McCall' the first line of your reply
  4428. (not the subject) to ensure automatic forwarding to the correct
  4429. Pindar user.
  4430. >From jum@helios.de 17 May 94 12:47:39 GMT
  4431. Path: ucivax!gateway
  4432. From: jum@helios.de (Jens-Uwe Mager)
  4433. Subject: Re: List Manager
  4434. Message-ID: <9405170547.aa00242@q2.ics.uci.edu>
  4435. Newsgroups: fa.think-c
  4436. X-Message-ID: <9405171247.AA23576@heliosd.helios.de>
  4437. Approved: usenet@q2.ics.uci.edu
  4438. Lines: 47
  4439. Date: 17 May 94 12:47:39 GMT
  4440.  
  4441.  
  4442. The only help I have found is to shorten the strings myself. I do put
  4443. en ellepsis and the end of the string to say it is truncated. The
  4444. following is an excerpt from an LDEF I am using:
  4445.  
  4446. /*
  4447.  * Draw string in width pixels. If the string is longer truncate on the
  4448.  * right side and show an ellepsis.
  4449.  */
  4450. void rAbbrDraw(s, width)
  4451. Str255 s;
  4452. int width;
  4453. {
  4454.         register int curWidth;
  4455.  
  4456.         width -= CharWidth(' ');
  4457.         if ((curWidth = StringWidth(s)) < width)
  4458.                 DrawString(s);
  4459.         else {
  4460.                 register int len = s[0];
  4461.                 register u_char *p = s+len;
  4462.                 curWidth += CharWidth('\311'); /* option-. (...) */
  4463.                 while (len && curWidth > width) {
  4464.                         len--;
  4465.                         curWidth -= CharWidth(*p);
  4466.                         p--;
  4467.                 }
  4468.                 DrawText(s+1, 0, len);
  4469.                 DrawChar('\311');
  4470.         }
  4471. }
  4472.  
  4473. I have also a variant that truncates from the left, e.g. if your focus is
  4474. on the end of the string.
  4475.  
  4476. Best Regards,
  4477. Jens-Uwe Mager
  4478.  
  4479. HELIOS Software GmbH
  4480. Lavesstr. 80
  4481. 30159 Hannover
  4482. Germany
  4483.  
  4484. Phone:          +49 511 36482-0
  4485. FAX:            +49 511 36482-69
  4486. AppleLink:      helios.de       Attn: Jens-Uwe Mager
  4487. Internet:       jum@helios.de
  4488. >From Olof.Morell@astro.uu.se 17 May 94 13:45:13 GMT
  4489. Path: ucivax!gateway
  4490. From: Olof.Morell@astro.uu.se (Olof Morell)
  4491. Subject: Re:  C programming style
  4492. Message-ID: <9405170645.aa01831@q2.ics.uci.edu>
  4493. Newsgroups: fa.think-c
  4494. X-Charset: ASCII
  4495. X-Message-ID: <9405171344.AA08921@solaris.astro.uu.se>
  4496. Approved: usenet@q2.ics.uci.edu
  4497. Lines: 8
  4498. Date: 17 May 94 13:45:13 GMT
  4499. X-Char-Esc: 29
  4500.  
  4501. There is a nice book:
  4502. C elements of style by Steve Oualline (C & C++),
  4503. 1992, ISBN 0-13-148222-X, M&T Publishing
  4504.  
  4505. Some of it is just cosmetics, but there are many great tips
  4506. on how to avoid evil traps with #include, etc.
  4507.  
  4508. Olle
  4509. >From chris.webster@dal.ca 17 May 94 15:49:13 GMT
  4510. Path: ucivax!gateway
  4511. From: chris.webster@dal.ca (Chris Webster)
  4512. Subject: Re: C programming style
  4513. X-Sender: webster@ac.dal.ca (Unverified)
  4514. Message-ID: <9405170849.aa07266@q2.ics.uci.edu>
  4515. Content-transfer-encoding: 7BIT
  4516. Newsgroups: fa.think-c
  4517. X-Message-ID: <01HCG2VBHC5E005E0S@AC.DAL.CA>
  4518. Approved: usenet@q2.ics.uci.edu
  4519. Lines: 18
  4520. Date-warning: Date header was inserted by AC.DAL.CA
  4521. Date: 17 May 94 15:49:13 GMT
  4522.  
  4523. >Are there any C programming style guidelines out there?
  4524.  
  4525.  
  4526. ftp from cs.utoronto.ca:doc/programming
  4527.  
  4528. >ihstyle is the "Indian Hill C Style and Coding Standards" from Bell
  4529. >Labs, "as amended for U of T Zoology" by Henry Spencer.
  4530.  
  4531. >pikestyle contains Rob Pike's notes on Programming in C, some comments on
  4532. >programming style for C.
  4533.  
  4534. >ten-commandments contains Henry's Ten Commandments for writing C code.
  4535.  
  4536.  
  4537.  
  4538. --
  4539. chris.webster@dal.ca
  4540.  
  4541. >From walrathw@rferl.org 17 May 94 16:41:32 GMT
  4542. Path: ucivax!gateway
  4543. From: walrathw@rferl.org (WalrathW)
  4544. Subject: RE: List Manager
  4545. Message-ID: <9405170941.aa09810@q2.ics.uci.edu>
  4546. Content-transfer-encoding: 7BIT
  4547. Content-type: TEXT/PLAIN; CHARSET=US-ASCII
  4548. Newsgroups: fa.think-c
  4549. X-Message-ID: <01HCGF6BILMA8WW8HG@MUVAXA.RFERL.ORG>
  4550. Approved: usenet@q2.ics.uci.edu
  4551. Lines: 35
  4552. Date: 17 May 94 16:41:32 GMT
  4553.  
  4554.  
  4555. >
  4556. _______________________________________________________________________________
  4557. > From: Pindar Infotek Ltd on Tue, May 17, 1994 14:24
  4558. > Subject: List Manager
  4559. > To: think-c@ics.UCI.EDU
  4560. >
  4561. >
  4562. > From Pindar user Ian McCall
  4563. >
  4564. > Subject: _List Manager
  4565. > How do I stop the List Manager from compressing text when displaying
  4566. > a list?
  4567. >
  4568. > I've got data which is sometimes slightly too long to fit in the cell
  4569. > size I've given, and the List Manager is trying to be helpful by
  4570. > changing the character spacing and making it fit. Trouble is, I'm
  4571. > trying to make things line up consistently and this helpfulness is
  4572. > getting in the way...
  4573. >
  4574. > Thanks in advance for any information.
  4575.  
  4576. You could try using different columns to line up the data, or you might try
  4577. using a mono-spaced font. Neither of these suggestions addresses the problem of
  4578. the text getting squashed. This might not happen with a mono-spaced font, but
  4579. you might try making the cell width longer than the list width. If this works,
  4580. it would mean that some of your text would get chopped in a rather unsightly
  4581. manner.
  4582.  
  4583. The ultimate solution to your problem is to write a custom LDEF. Sample code
  4584. abounds on the Internet and other places.
  4585.  
  4586. -wayne
  4587.  
  4588. walrathw@rferl.org
  4589. >From Lance.Helsten@m.cc.utah.edu 17 May 94 17:46:56 GMT
  4590. Path: ucivax!gateway
  4591. From: Lance.Helsten@m.cc.utah.edu (Lance Helsten)
  4592. Subject: Re: C programming style
  4593. Message-ID: <9405171046.aa14522@q2.ics.uci.edu>
  4594. In-Reply-To: <9405170253.aa12419@q2.ics.uci.edu>
  4595. Content-Type: TEXT/PLAIN; charset=US-ASCII
  4596. MIME-Version: 1.0
  4597. Newsgroups: fa.think-c
  4598. X-Message-ID: <Pine.3.07.9405171100.A10180-a100000@u.cc.utah.edu>
  4599. Approved: usenet@q2.ics.uci.edu
  4600. Lines: 18
  4601. Date: 17 May 94 17:46:56 GMT
  4602.  
  4603. > >From my experience, disagreements over programming style have been
  4604. > a primary obstacle to teams attempting to work closely together.
  4605. > One problem is indentation and brace placement because it greatly
  4606. > changes the appearance of the code. Careful visual layout of the
  4607. > code is important. It makes the difference between a program that
  4608. > anyone can read and one that everyone want to rewrite.
  4609. >
  4610. > Are there any C programming style guidelines out there? Any books?
  4611. >
  4612.  
  4613. "Writing solid code" is a fairly good book on programming style, though it
  4614. does not cover {} and indents. That is really a personal or team choice.
  4615. There are other issues which are more critical to solid code than code
  4616. formatting.
  4617.  
  4618. Lance
  4619.  
  4620.  
  4621. >From gurgle@netcom.com 17 May 94 17:48:31 GMT
  4622. Path: ucivax!gateway
  4623. From: gurgle@netcom.com (Pete Gontier)
  4624. Subject: Re: List Manager
  4625. Message-ID: <9405171048.aa14734@q2.ics.uci.edu>
  4626. In-Reply-To: <9405170403.aa17149@q2.ics.uci.edu> from "Pindar Infotek Ltd" at May 17, 94 11:03:42 am
  4627. X-Mailer: ELM [version 2.4 PL23]
  4628. Content-Transfer-Encoding: 7bit
  4629. Content-Type: text/plain; charset=US-ASCII
  4630. Content-Length: 1011
  4631. MIME-Version: 1.0
  4632. Newsgroups: fa.think-c
  4633. X-Message-ID: <199405171748.KAA19245@netcom.com>
  4634. Approved: usenet@q2.ics.uci.edu
  4635. Lines: 21
  4636. Date: 17 May 94 17:48:31 GMT
  4637.  
  4638. Attn: Ian McCall
  4639.  
  4640. > How do I stop the List Manager from compressing text when displaying
  4641. > a list? I've got data which is sometimes slightly too long to fit in
  4642. > the cell size I've given, and the List Manager is trying to be helpful
  4643. > by changing the character spacing and making it fit. Trouble is, I'm
  4644. > trying to make things line up consistently and this helpfulness is
  4645. > getting in the way...
  4646.  
  4647. In your call to 'LNew', try setting 'cellSize.h' to something larger
  4648. than 'rView.right - rView.left'. THINK Reference documents the method
  4649. used by the List Manager to determine the (height and) width if you pass
  4650. 0,0 for 'cellSize'; you could augment that algorithm.
  4651.  
  4652. --
  4653.  Pete Gontier, CTO, Integer Poet Software; gurgle@netcom.com
  4654.  
  4655.  'It seems the firm contracted by Intel to produce the famed "flying
  4656.  Pentium" ads could not complete the 3-D modeling on a PC before
  4657.  deadline. So in the best know-your-enemy tradition, they chose the next
  4658.  best thing -- a Quadra 840AV.'                 -- Mac The Knife 4/18/94
  4659. >From whusain@k12.az.us 17 May 94 20:16:08 GMT
  4660. Path: ucivax!gateway
  4661. From: whusain@k12.az.us (Will Glass-Husain)
  4662. Subject: Think C version 7.0
  4663. Message-ID: <9405171316.aa24004@q2.ics.uci.edu>
  4664. Content-Type: TEXT/PLAIN; charset=US-ASCII
  4665. content-length: 187
  4666. Mime-Version: 1.0
  4667. Newsgroups: fa.think-c
  4668. X-Message-ID: <Pine.3.89.9405171301.A8572-0100000@azedlink1.ade.state.az.us>
  4669. Approved: usenet@q2.ics.uci.edu
  4670. Lines: 8
  4671. Date: 17 May 94 20:16:08 GMT
  4672.  
  4673.  
  4674. Does anyone knoe when version 7.0 is going to come out?  I want to
  4675. upgrade (I have version 5.0).  Should I upgrade to 6.0 or wait for 7.0?
  4676.  
  4677. Thanks,
  4678.  
  4679. Will Glass-Husain
  4680. whusain@k12.az.us
  4681. >From fstiffo@unive.it 18 May 94 16:35:55 GMT
  4682. Path: ucivax!gateway
  4683. From: fstiffo@unive.it (Francesco Stiffoni)
  4684. Subject: Strange things after debugging
  4685. Message-ID: <9405180935.aa01506@q2.ics.uci.edu>
  4686. Content-Type: text/plain; charset="us-ascii"
  4687. Mime-Version: 1.0
  4688. Newsgroups: fa.think-c
  4689. X-Message-ID: <199405180653.AA27595@vega.cicsd.unive.it>
  4690. Approved: usenet@q2.ics.uci.edu
  4691. Lines: 16
  4692. Date: 18 May 94 16:35:55 GMT
  4693.  
  4694. I'm using THINK C++ 7.0 recently upgraded. Trying some TCL examples with
  4695. THINK debugger on something strange happens. Randomly, but more often when
  4696. I put breakpoints, after exiting debugging, the call of traps _loadSeg and
  4697. _addDrive (probably patched by debugger) activates MacsBug (if loaded, else
  4698. TRAP not found error). Inspecting the code reveals _Debugger traps put
  4699. before and around the PC. The same thing happened with version 6.0, but
  4700. after version 6.0.1 disappeared. All the matter is annoying, please give me
  4701. some help.
  4702.  
  4703.  
  4704. Francesco Stiffoni
  4705. University of Venice
  4706. Linguistic Department
  4707. Laboratory of Computational Linguistic
  4708.  
  4709.  
  4710. >From chrism@corp.cirrus.com 18 May 94 17:21:38 GMT
  4711. Path: ucivax!gateway
  4712. From: chrism@corp.cirrus.com (Chris Metcalfe)
  4713. Subject: Re: Symantec C++ RISC Compiler
  4714. Message-ID: <9405181021.aa04536@q2.ics.uci.edu>
  4715. Newsgroups: fa.think-c
  4716. X-Message-ID: <9405181721.AA25341@tango.corp.cirrus.com>
  4717. Approved: usenet@q2.ics.uci.edu
  4718. Lines: 8
  4719. Date: 18 May 94 17:21:38 GMT
  4720.  
  4721. OK --
  4722.  
  4723. The Symantec PowerPC cross-development kit does output native
  4724. PowerPC executables.  Thanks for the many corrections.  Now
  4725. I know first-hand what happens when one 'assumes' ...
  4726.  
  4727. -- Chris Metcalfe
  4728.  
  4729. >From DonPoletti@aol.com 18 May 94 22:06:51 GMT
  4730. Path: ucivax!gateway
  4731. From: DonPoletti@aol.com
  4732. Subject: Programing Partner in D.C.
  4733. Message-ID: <9405181506.aa20538@q2.ics.uci.edu>
  4734. X-Mailer: America Online Mailer
  4735. Newsgroups: fa.think-c
  4736. X-Message-ID: <9405181806.tn251487@aol.com>
  4737. Approved: usenet@q2.ics.uci.edu
  4738. Lines: 9
  4739. Date: 18 May 94 22:06:51 GMT
  4740.  
  4741. I live in Washington D.C. area and was looking for someone one was interested
  4742. in collaborating on writing some games for publication, either shareware or
  4743. though a distributor. I have started on a pinochole program and an
  4744. ultima/king's bouty type game.
  4745.  
  4746. If anyone is intrested e-mail me directly
  4747.  
  4748.                                                         Don
  4749.  
  4750. >From DLJones399@aol.com 18 May 94 22:51:46 GMT
  4751. Path: ucivax!gateway
  4752. From: DLJones399@aol.com
  4753. Subject: List Manager
  4754. Message-ID: <9405181551.aa24066@q2.ics.uci.edu>
  4755. X-Mailer: America Online Mailer
  4756. Newsgroups: fa.think-c
  4757. X-Message-ID: <9405181851.tn252973@aol.com>
  4758. Approved: usenet@q2.ics.uci.edu
  4759. Lines: 33
  4760. Date: 18 May 94 22:51:46 GMT
  4761.  
  4762. >
  4763. ______________________________________________________________________________
  4764. _
  4765. > From: Pindar Infotek Ltd on Tue, May 17, 1994 14:24
  4766. > Subject: List Manager
  4767. > To: think-c@ics.UCI.EDU
  4768. >
  4769. >
  4770. > From Pindar user Ian McCall
  4771. >
  4772. > Subject: _List Manager
  4773. > How do I stop the List Manager from compressing text when displaying
  4774. > a list?
  4775. >
  4776. > I've got data which is sometimes slightly too long to fit in the cell
  4777. > size I've given, and the List Manager is trying to be helpful by
  4778. > changing the character spacing and making it fit. Trouble is, I'm
  4779. > trying to make things line up consistently and this helpfulness is
  4780. > getting in the way...
  4781. >
  4782. > Thanks in advance for any information.
  4783.  
  4784. Sounds to me like you have one of the utility programs installed which
  4785. automatically compresses the file names in open and close dialog boxes.  I
  4786. believe this is a feature of NOW Utilities and others.
  4787.  
  4788. If the file names in the open and close dialog boxes also compress when you
  4789. have long file names when you are outside of the C programming enviroment -
  4790. this is probably the cause.
  4791.  
  4792. Dennis Jones
  4793. DLJones399@AOL.com
  4794.  
  4795. >From SJKim@aol.com 19 May 94 02:50:37 GMT
  4796. Path: ucivax!gateway
  4797. From: SJKim@aol.com
  4798. Subject: Problem w/ TCL C++ DEMO
  4799. Message-ID: <9405181950.aa04703@q2.ics.uci.edu>
  4800. X-Mailer: America Online Mailer
  4801. Newsgroups: fa.think-c
  4802. X-Message-ID: <9405182250.tn262132@aol.com>
  4803. Approved: usenet@q2.ics.uci.edu
  4804. Lines: 16
  4805. Date: 19 May 94 02:50:37 GMT
  4806.  
  4807. Hello,
  4808. When I tried to run TCL Demo(any demo that is writte in C++), I got this
  4809. error:
  4810.  
  4811. Error: Prefix "Symantec C++"; line 1
  4812. Different configuration for precompiled header
  4813.  
  4814. The line contains: #include <TCLHeaders++>
  4815.  
  4816. I had no problem if I compile/run TCL demo, C object, but if I try to
  4817. compile/run  any TCL demo C++, then I get this error.
  4818. Does anyone know what the problem is?
  4819. Thanks in advance.
  4820.  
  4821. sjkim@aol.com
  4822.  
  4823. >From holla@monique.adgrp.gatech.edu 19 May 94 08:32:49 GMT
  4824. Path: ucivax!gateway
  4825. From: holla@monique.adgrp.gatech.edu (Craig Hollabaugh)
  4826. Subject: templates and overloading bug
  4827. Message-ID: <9405190132.aa15237@q2.ics.uci.edu>
  4828. Content-Type: text/plain; charset="us-ascii"
  4829. Mime-Version: 1.0
  4830. Newsgroups: fa.think-c
  4831. X-Message-ID: <9405190834.AA05224@monique.adgrp.gatech.edu>
  4832. Approved: usenet@q2.ics.uci.edu
  4833. Lines: 35
  4834. Date: 19 May 94 08:32:49 GMT
  4835.  
  4836. Folks,
  4837.  
  4838. I looked around for information concerning my problem but found none. Is
  4839. there a published bug list for the 7.0 version of C++ compiler? Anyway ...
  4840.  
  4841. I'm trying to overload the "<<" operator while using templates. After some
  4842. fooling around for a couple hours, I figured out that the C++ compiler has
  4843. a problem generating code for this situation (the linker then can't find my
  4844. overloaded function). Looking for code examples, I stumbled on the Symantec
  4845. Vector Demo, which is exactly the same as the project I'm working on.
  4846.  
  4847. If I use the 6.01 version of C++ everything works fine, but if I use 7.0
  4848. and recompile the vector demo, the linker can't find the overloaded "<<"
  4849. functions. Here are the 7.0 linker errors from the vector demo.
  4850.  
  4851. undefined: operator <<(ostream&,vector<char>&) (main.cp)
  4852. undefined: operator <<(ostream&,vector<myDate>&) (main.cp)
  4853. undefined: operator <<(ostream&,vector<float>&) (main.cp)
  4854. undefined: operator <<(ostream&,vector<int>&) (main.cp)
  4855.  
  4856.  
  4857. The 7.0 disassembler doesn't produce code for this line in vector.cp
  4858. (actually vector<XXX>.cp).
  4859.  
  4860. template<class T> ostream& operator<<(ostream& s,  vector<T>& v)
  4861.  
  4862.  
  4863.  
  4864.  
  4865. Can someone verify this problem and possibly offer a work around?
  4866.  
  4867. Thanks,
  4868. craig
  4869.  
  4870.  
  4871. >From robert.ward@mrc-apu.cam.ac.uk 19 May 94 11:31:12 GMT
  4872. Path: ucivax!gateway
  4873. From: robert.ward@mrc-apu.cam.ac.uk (Robert Ward)
  4874. Subject: ResEdit STR templates
  4875. Via: uk.ac.cambridge.mrc-applied-psychology; Thu, 19 May 1994 12:00:07 +0100
  4876. X-Sender: robert@pophost.mrc-apu.cam.ac.uk
  4877. Message-ID: <9405190431.aa04042@q2.ics.uci.edu>
  4878. Content-Type: text/plain; charset="us-ascii"
  4879. Mime-Version: 1.0
  4880. Newsgroups: fa.think-c
  4881. X-Message-ID: <28583.9405191055@sirius.mrc-apu.cam.ac.uk>
  4882. Approved: usenet@q2.ics.uci.edu
  4883. Lines: 14
  4884. Date: 19 May 94 11:31:12 GMT
  4885.  
  4886.  
  4887. I want to have some easily editable STR# resources in which the STR's
  4888. themselves may contain TAB characters. Unfortunately the STR editor in
  4889. ResEdit uses TAB, shift-TAB, option-TAB, etc to move between fields.
  4890. Putting "\t" within the STR seems to print literally, "\t". I can insert
  4891. tabs with the hex editor, but I was hoping there was a more user-friendly
  4892. solution.
  4893.  
  4894. Robert Ward
  4895. MRC Applied Psychology Unit           phone:  (223) 355294 ext 602
  4896. 15 Chaucer Road                       fax:    (223) 359062
  4897. Cambridge CB2 2EF, UK                 e-mail: robert.ward@mrc-apu.cam.ac.uk
  4898.  
  4899.  
  4900. >From abarne1@gl.umbc.edu 19 May 94 14:05:31 GMT
  4901. Path: ucivax!gateway
  4902. From: abarne1@gl.umbc.edu (barnett aaron)
  4903. Subject: small icons in lists
  4904. Message-ID: <9405190705.aa08367@q2.ics.uci.edu>
  4905. Newsgroups: fa.think-c
  4906. X-Message-ID: <199405191319.JAA01922@umbc9.umbc.edu>
  4907. Approved: usenet@q2.ics.uci.edu
  4908. Lines: 5
  4909. Date: 19 May 94 14:05:31 GMT
  4910.  
  4911. can anyone point me to a ldef that does the small icons along with text.
  4912.  
  4913. \.
  4914. aaron <abarne1@gl.umbc.edu>
  4915. "It's a safety mechanism, the mind shuts off."
  4916. >From gurgle@netcom.com 19 May 94 16:01:52 GMT
  4917. Path: ucivax!gateway
  4918. From: gurgle@netcom.com (Pete Gontier)
  4919. Subject: Re: ResEdit STR templates
  4920. Message-ID: <9405190901.aa13015@q2.ics.uci.edu>
  4921. In-Reply-To: <9405190431.aa04042@q2.ics.uci.edu> from "Robert Ward" at May 19, 94 11:31:12 am
  4922. X-Mailer: ELM [version 2.4 PL23]
  4923. Content-Transfer-Encoding: 7bit
  4924. Content-Type: text/plain; charset=US-ASCII
  4925. Content-Length: 920
  4926. MIME-Version: 1.0
  4927. Newsgroups: fa.think-c
  4928. X-Message-ID: <199405191557.IAA24892@netcom.com>
  4929. Approved: usenet@q2.ics.uci.edu
  4930. Lines: 19
  4931. Date: 19 May 94 16:01:52 GMT
  4932.  
  4933. > I want to have some easily editable STR# resources in which the STR's
  4934. > themselves may contain TAB characters. Unfortunately the STR editor in
  4935. > ResEdit uses TAB, shift-TAB, option-TAB, etc to move between fields.
  4936. > Putting "\t" within the STR seems to print literally, "\t". I can
  4937. > insert tabs with the hex editor, but I was hoping there was a more
  4938. > user-friendly solution.
  4939.  
  4940. I'd say write a wrapper routine for GetIndString which translates "\t"
  4941. into <tab> and "\\" into '\'. While you're at it, you could have it
  4942. process the other C-style string escape sequences, too.
  4943.  
  4944. Resorcerer doesn't do *anything* with tabs in this situation (the UI is
  4945. completely different), so I can't recommend it like I wanted to. :-(
  4946.  
  4947. --
  4948.  Pete Gontier, CTO, Integer Poet Software; gurgle@netcom.com
  4949.  
  4950.  "The human race will decree from time to time: 'There is something at
  4951.  which it is absolutely forbidden to laugh.'" -- Nietzche on C++
  4952. >From gurgle@netcom.com 19 May 94 16:05:08 GMT
  4953. Path: ucivax!gateway
  4954. From: gurgle@netcom.com (Pete Gontier)
  4955. Subject: Re: List Manager
  4956. Message-ID: <9405190905.aa13201@q2.ics.uci.edu>
  4957. In-Reply-To: <9405181551.aa24066@q2.ics.uci.edu> from "DLJones399@aol.com" at May 18, 94 10:51:46 pm
  4958. X-Mailer: ELM [version 2.4 PL23]
  4959. Content-Transfer-Encoding: 7bit
  4960. Content-Type: text/plain; charset=US-ASCII
  4961. Content-Length: 1259
  4962. MIME-Version: 1.0
  4963. Newsgroups: fa.think-c
  4964. X-Message-ID: <199405191604.JAA26964@netcom.com>
  4965. Approved: usenet@q2.ics.uci.edu
  4966. Lines: 23
  4967. Date: 19 May 94 16:05:08 GMT
  4968.  
  4969. > Sounds to me like you have one of the utility programs installed which
  4970. > automatically compresses the file names in open and close dialog
  4971. > boxes. I believe this is a feature of NOW Utilities and others. If
  4972. > the file names in the open and close dialog boxes also compress when
  4973. > you have long file names when you are outside of the C programming
  4974. > enviroment - this is probably the cause.
  4975.  
  4976. This compression is a feature of many lists under System 7. LDEF 0
  4977. does it and so does the LDEF used by Standard File. Unfortunately, I
  4978. don't have time right now to verify this for certain regarding LDEF 0,
  4979. but that's what I remember. It doesn't surprise me that someone would
  4980. encounter this while writing a new program, because normally you would
  4981. want to truncate a compressed string or make the list/cell wider instead
  4982. of relying on the compression, so finished programs should not exhibit
  4983. too much of this behavior.
  4984.  
  4985. --
  4986.  Pete Gontier, CTO, Integer Poet Software; gurgle@netcom.com
  4987.  
  4988.  'It seems the firm contracted by Intel to produce the famed "flying
  4989.  Pentium" ads could not complete the 3-D modeling on a PC before
  4990.  deadline. So in the best know-your-enemy tradition, they chose the next
  4991.  best thing -- a Quadra 840AV.'                 -- Mac The Knife 4/18/94
  4992. >From GomollD@aol.com 19 May 94 16:49:20 GMT
  4993. Path: ucivax!gateway
  4994. From: GomollD@aol.com
  4995. Subject: At Ease AppleEvents
  4996. Message-ID: <9405190949.aa15848@q2.ics.uci.edu>
  4997. X-Mailer: America Online Mailer
  4998. Newsgroups: fa.think-c
  4999. X-Message-ID: <9405191249.tn279521@aol.com>
  5000. Approved: usenet@q2.ics.uci.edu
  5001. Lines: 7
  5002. Date: 19 May 94 16:49:20 GMT
  5003.  
  5004. Does anyone know where I can get a list of them?
  5005.  
  5006. Specificaly - I need to send an 'odoc' event to the finder.  This works fine
  5007. when there IS a Finder... What happens if At Ease quits the finder?
  5008.  
  5009. -gomolld@aol.com
  5010.  
  5011. >From walrathw@rferl.org 19 May 94 18:33:23 GMT
  5012. Path: ucivax!gateway
  5013. From: walrathw@rferl.org (WalrathW)
  5014. Subject: RE: small icons in lists
  5015. Message-ID: <9405191133.aa21823@q2.ics.uci.edu>
  5016. Content-transfer-encoding: 7BIT
  5017. Content-type: TEXT/PLAIN; CHARSET=US-ASCII
  5018. Newsgroups: fa.think-c
  5019. X-Message-ID: <01HCJBNHPPJ68WWICK@MUVAXA.RFERL.ORG>
  5020. Approved: usenet@q2.ics.uci.edu
  5021. Lines: 40
  5022. Date: 19 May 94 18:33:23 GMT
  5023.  
  5024.  
  5025.  
  5026.  Macintosh Programming Secrets by Knaster & Rollin contains a simple custom
  5027. LDEF using small icons and  text. I recommend buying the book for all the other
  5028. interesting info in it, but the sources were generously uploaded to the nets by
  5029. the authors. Look in the source directories (at umich or sumex) for MPS or
  5030. something similar. There's also code for zooming windows, a custom WDEF, fancy
  5031. dialogs, and more.
  5032.  
  5033. -wayne
  5034. _______________________________________________________________________________
  5035. From: barnett aaron on Thu, May 19, 1994 16:34
  5036. Subject: small icons in lists
  5037. To: think-c@ics.UCI.EDU
  5038.  
  5039. can anyone point me to a ldef that does the small icons along with text.
  5040.  
  5041. \.
  5042. aaron <abarne1@gl.umbc.edu>
  5043. "It's a safety mechanism, the mind shuts off."
  5044.  
  5045. ------------------ RFC822 Header Follows ------------------
  5046. Received: by mumcbm.rferl.org with SMTP;19 May 1994 16:34:34 U
  5047. Received: from moose.cs.indiana.edu by MUVAXA.RFERL.ORG (PMDF V4.2-12 #5010) id
  5048.  <01HCJ3BVGQDC8WWHJQ@MUVAXA.RFERL.ORG>; Thu, 19 May 1994 16:34:26 CET
  5049. Received: from binky.ics.uci.edu by moose.cs.indiana.edu (5.65c/9.4jsm) id
  5050.  AA13515; Thu, 19 May 1994 09:34:18 -0500
  5051. Received: from ics.uci.edu by binky.ics.uci.edu id aa12281; 19 May 94 7:08 PDT
  5052. Received: from ics.uci.edu by binky.ics.uci.edu id aa12277; 19 May 94 7:05 PDT
  5053. Received: from USENET by q2.ics.uci.edu id aa08387; 19 May 94 7:05 PDT
  5054. Date: Thu, 19 May 1994 14:05:31 +0000 (GMT)
  5055. From: barnett aaron <abarne1@gl.umbc.edu>
  5056. Subject: small icons in lists
  5057. To: think-c@ics.UCI.EDU
  5058. Message-id: <9405190705.aa08367@q2.ics.uci.edu>
  5059. Content-type: TEXT/PLAIN; CHARSET=US-ASCII
  5060. Content-transfer-encoding: 7BIT
  5061. Newsgroups: fa.think-c
  5062. X-Message-Id: <199405191319.JAA01922@umbc9.umbc.edu>
  5063. Approved: usenet@q2.ics.uci.edu
  5064. >From msandri@netcom.com 19 May 94 19:48:43 GMT
  5065. Path: ucivax!gateway
  5066. From: msandri@netcom.com (Marco Sandri)
  5067. Subject: XCMDs and CopyBits...
  5068. Message-ID: <9405191248.aa26094@q2.ics.uci.edu>
  5069. Return-Receipt-To: msandri@netcom.com
  5070. X-Mailer: ELM [version 2.4 PL23]
  5071. Content-Transfer-Encoding: 7bit
  5072. Content-Type: text/plain; charset=US-ASCII
  5073. Content-Length: 894
  5074. MIME-Version: 1.0
  5075. Newsgroups: fa.think-c
  5076. Reply-To: Marco Sandri <msandri@netcom.com>
  5077. X-Message-ID: <199405191948.MAA28088@netcom.netcom.com>
  5078. Approved: usenet@q2.ics.uci.edu
  5079. Lines: 25
  5080. Date: 19 May 94 19:48:43 GMT
  5081.  
  5082. Hello!
  5083.  
  5084. I'm developing a XCMD that should read and write PICTs.
  5085. I do the read/write work with the quickdraw bottlenecks, but it works only
  5086. in applications, and not in code resources like XCMDs.
  5087.  
  5088. My code works as follows:
  5089. - installation of my bottleneck routine (getpict)
  5090. - GetPictInfo to obtain info about the pict image (size, depth, ...)
  5091. - restore of the old bottlenecks
  5092. - creation of the GWorld of the right depth and size (and SetGWorld)
  5093. - installation of quickdraw bottlenecks
  5094. - DrawPict
  5095. - restore of the prev. bottlenecks.
  5096.  
  5097. I'm doing the work this way, because I would allow the user to load an image
  5098. without requiring a large amount of free RAM (eg: I'd like to load a 1Mb PICT
  5099. with 1.2Mb of free mem). I couldn't figure out how to do this without the
  5100. bottlenecks...
  5101.  
  5102. Of course, I've the same problem creating the PICT (with putpictproc bottleneck)
  5103.  
  5104. Any ideas?
  5105.  
  5106. Many thanks in advance.
  5107. >From jwiggins@lightstream.com 19 May 94 20:47:15 GMT
  5108. Path: ucivax!gateway
  5109. From: jwiggins@lightstream.com (John Wiggins (LS TP/414 508-262-1021) )
  5110. Subject: Cross Development Kit & Compiling on Power Mac
  5111. Message-ID: <9405191347.aa29199@q2.ics.uci.edu>
  5112. Newsgroups: fa.think-c
  5113. X-Message-ID: <9405192046.AA08074@leucrotta.LightStream.COM>
  5114. Approved: usenet@q2.ics.uci.edu
  5115. Lines: 30
  5116. Date: 19 May 94 20:47:15 GMT
  5117.  
  5118. Folks:
  5119.  
  5120. I'm new to the group, so you may have covered this ground already this
  5121. month.  I have looked in the archives for an answers, but didn't this
  5122. covered there...
  5123.  
  5124. I have two questions about the Cross Development Kit* that Symantec is
  5125. selling for $100, plus S&H&tax.  I have called both their sales, and
  5126. Tech support lines, but neither could give definitive answers.  Here
  5127. are the questions:
  5128.  
  5129.         1) I have upgraded by C++ 6.0 to 7.0 using the (free) upgrade
  5130.            kit. Can I get by using just the "Cross Development Kit"
  5131.            alone, with just losing the neat extra functionality of introduced
  5132.            in version 7? (Must I spend another ~$170, with S&H&tax, for the
  5133.            "C++ 7.0 for Macintosh" package they offer with it?)
  5134.         2) Are there any problems in running the "Cross Development Kit"
  5135.            directly on a Power Mac to generate the Power Mac code?  It
  5136.            would be less useful to have to go to a 68K machine to compile...
  5137.  
  5138. Thanks,
  5139. _John_
  5140.  
  5141. email: jwiggins@lightstream.com                 Dr. John Wiggins, TP/414
  5142.  tele: 508-262-1021                             1100 Technology Park Drive
  5143.   FAX: 508-262-1039                             Billerica, MA 01821
  5144.  
  5145. _______
  5146. *  This is the kit to cross-compile to PPC 601 code for Power Mac
  5147.  
  5148. >From kupermaj@tardis.union.edu 20 May 94 01:58:01 GMT
  5149. Path: ucivax!gateway
  5150. From: kupermaj@tardis.union.edu (Joshua Kuperman)
  5151. Subject: VA problems and questions
  5152. Message-ID: <9405191857.aa13341@q2.ics.uci.edu>
  5153. X-Mailer: ELM [version 2.4 PL21]
  5154. Content-Type: text
  5155. Content-Length: 1457
  5156. Newsgroups: fa.think-c
  5157. X-Message-ID: <199405200157.AA26721@tardis.union.edu>
  5158. Approved: usenet@q2.ics.uci.edu
  5159. Lines: 32
  5160. Date: 20 May 94 01:58:01 GMT
  5161.  
  5162. I am trying to get a grip on using Virtual Architect and
  5163. would appreciate any help (including being told to rtfm if
  5164. you include page numbers).
  5165.  
  5166. 1.  I did the Beeper example. I then tried to change it to
  5167. use the range editing that could be set with VA. I changed it
  5168. to only allow 1 to 10 beeps.When I run the app - the field is checked
  5169. for valid values when I try to quit. However when I hit the "beep"
  5170. button it is ignored.  What do I have to do to force all the edited
  5171. fields to be checked. I'm assuming that all the other buttons are
  5172. inheriting a method, that I lost when I put in the stuff to do the
  5173. beep.
  5174.  
  5175. 2.  I went through the Process Monitor. I then tried to copy some
  5176. buttons, icons, and other resources into my VisualArchitect.rsrc to
  5177. see if I could use them with an app.  I couldn't get so much as one
  5178. button to show up.  What did I miss.
  5179.  
  5180. 3.  What would I need to do to copy a video player window (the window
  5181. with the sound control on the left, a play/button, and then a farily
  5182. normal scroll plane on the bottom) like the one used by MovieEditor,
  5183. VideoFusion Recorder, and SimplyPlayer.  How could I then save so that
  5184. it would always be available for any new Visual Architect project.
  5185.  
  5186. TIA, but be warned - if I ever get VA figured out I'll probably just
  5187. start posting lots of "real coding" questions.
  5188.  
  5189. --
  5190. Josh Kuperman                  The favorite doesn't always win,
  5191. kupermaj@tardis.union.edu      no matter what the odds. -I. Gershwin
  5192.  
  5193.  
  5194. >From Lance.Helsten@m.cc.utah.edu 20 May 94 14:41:45 GMT
  5195. Path: ucivax!gateway
  5196. From: Lance.Helsten@m.cc.utah.edu (Lance Helsten)
  5197. Subject: Re: List Manager
  5198. Message-ID: <9405200741.aa17445@q2.ics.uci.edu>
  5199. In-Reply-To: <9405181551.aa24066@q2.ics.uci.edu>
  5200. Content-Type: TEXT/PLAIN; charset=US-ASCII
  5201. MIME-Version: 1.0
  5202. Newsgroups: fa.think-c
  5203. X-Message-ID: <Pine.3.07.9405200836.A9840-a100000@u.cc.utah.edu>
  5204. Approved: usenet@q2.ics.uci.edu
  5205. Lines: 24
  5206. Date: 20 May 94 14:41:45 GMT
  5207.  
  5208. > > I've got data which is sometimes slightly too long to fit in the cell
  5209. > > size I've given, and the List Manager is trying to be helpful by
  5210. > > changing the character spacing and making it fit. Trouble is, I'm
  5211. > > trying to make things line up consistently and this helpfulness is
  5212. > > getting in the way...
  5213. > >
  5214. > > Thanks in advance for any information.
  5215. >
  5216. > Sounds to me like you have one of the utility programs installed which
  5217. > automatically compresses the file names in open and close dialog boxes.  I
  5218. > believe this is a feature of NOW Utilities and others.
  5219. >
  5220. > If the file names in the open and close dialog boxes also compress when you
  5221. > have long file names when you are outside of the C programming enviroment -
  5222. > this is probably the cause.
  5223. >
  5224.  
  5225. Actually, System 7.x does the compression automatically and the only thing
  5226. that can be done about it is to write your own LDEF. For the how to on
  5227. that see New Inside Mac More Toolbox (I believe that is the name).
  5228.  
  5229. Lance
  5230.  
  5231.  
  5232. >From jcaufiel@cln.etc.bc.ca 20 May 94 19:44:56 GMT
  5233. Path: ucivax!gateway
  5234. From: jcaufiel@cln.etc.bc.ca (Brent Taylor)
  5235. Subject: Alert Positions (SFP) in S7
  5236. Message-ID: <9405201244.aa01922@q2.ics.uci.edu>
  5237. Newsgroups: fa.think-c
  5238. X-Message-ID: <9405201949.AA01470@cln.etc.bc.ca>
  5239. Approved: usenet@q2.ics.uci.edu
  5240. Lines: 10
  5241. Date: 20 May 94 19:44:56 GMT
  5242.  
  5243. Does anyone know the specific algorithm System 7 uses to compute alert
  5244. positions?  Specifically, does anyone know how S7 centers Standard File
  5245. Package dialogs?  I wish to align my app window with the SFP windows if
  5246. possible.
  5247.  
  5248. __________________________________________________________________________
  5249. Brent Taylor, Computer Science / Math Teacher         Phone: (604)865-4674
  5250. Elkford Secondary School                                Fax: (604)865-2915
  5251. Box 910, Elkford, BC, Canada  V0B 1H0               jcaufiel@cln.etc.bc.ca
  5252.  
  5253. >From waldorfm@admina.rferl.org 22 May 94 18:43:40 GMT
  5254. Path: ucivax!gateway
  5255. From: waldorfm@admina.rferl.org (Markus Waldorf)
  5256. Subject: How to play with windows in an INIT?
  5257. Content-transfer-encoding: 7BIT
  5258. X-Message-ID: <01HCNIVSOAQA90NO3J@AdminA.RFERL.Org>
  5259. Approved: usenet@q2.ics.uci.edu
  5260. Lines: 103
  5261. Date-warning: Date header was inserted by AdminA.RFERL.Org
  5262. Date: 22 May 94 18:43:40 GMT
  5263. X-Sender: waldorfm@muvaxb.rferl.org
  5264. Message-ID: <9405221143.aa04280@q2.ics.uci.edu>
  5265. Content-type: text/plain; charset="us-ascii"
  5266. MIME-version: 1.0
  5267. Newsgroups: fa.think-c
  5268.  
  5269. I'm currently creating an INIT (just for fun!) and have the
  5270. following problem:
  5271.  
  5272. At some point I want the INIT to display a PICT or text in a
  5273. plain window during the startup process. The window should
  5274. discard automatically before loading all the other INITs.
  5275. I thought I may try using Quickdraw and the Window Manager,
  5276. but yet have not much success. I've checked out other source
  5277. code, but haven't found what I need. Perhaps someone can help me.
  5278. Thanks!
  5279.  
  5280. How can I draw a window, and how to dispose it?
  5281.  
  5282.  
  5283. Here is some of the coding I have so far:
  5284.  
  5285.  
  5286. struct qdStruc {
  5287.         char            privates[76];
  5288.         long            randSeed;
  5289.         BitMap          screenBits;
  5290.         Cursor          arrow;
  5291.         Pattern         dkGray;
  5292.         Pattern         ltGray;
  5293.         Pattern         gray;
  5294.         Pattern         black;
  5295.         Pattern         white;
  5296.         GrafPtr         thePort;
  5297.         long            end;
  5298. };
  5299.  
  5300. typedef struct qdStruc qdStruc;
  5301.  
  5302.  
  5303. void main( void )
  5304. {
  5305.  
  5306.         RememberA0();               // set up A4 to access resource globals
  5307.         SetUpA4();
  5308.  
  5309.         StartupStatus();            // might call DrawWindow()
  5310.  
  5311.         RestoreA4();
  5312.  
  5313. } // Main()
  5314.  
  5315.  
  5316.  
  5317. void DrawWindow( void )
  5318. {
  5319.         WindowPtr   window;
  5320.         qdStruc     quickDraw;
  5321.         GrafPort    localPort;
  5322.         long        our_a5;
  5323.         long        old_a5;
  5324.         long        old_CurrentA5;
  5325.  
  5326.  
  5327.         asm 68000                        // Prepare A5 for InitGraf call
  5328.             {
  5329.             move.l          CurrentA5,old_CurrentA5
  5330.             move.l          a5,old_a5
  5331.             lea             our_a5,a5
  5332.             move.l          a5,CurrentA5
  5333.             }
  5334.  
  5335.  
  5336.         InitGraf( & (quickDraw.thePort ) );     // InitGraf
  5337.         OpenPort( &localPort );                 // open our GrafPort
  5338.  
  5339.         SysBeep( 10 );
  5340.  
  5341.         window = GetNewWindow( 128, nil, (WindowPtr)-1L );
  5342.  
  5343.         SysBeep( 10 );
  5344.  
  5345.         /* AFTER THE 1st BEEP THE COMPUTER TOTATLY STOPS!
  5346.            Perhaps I cannot use the GetNewWindow function here.
  5347.            It's a small window! */
  5348.  
  5349.         /* ... */
  5350.  
  5351.  
  5352.         ClosePort( &localPort );
  5353.  
  5354.  
  5355.         asm 68000                     // Reset A5 and CurrentA5
  5356.             {
  5357.             movea.l         old_a5,a5
  5358.             move.l          old_CurrentA5,CurrentA5
  5359.             }
  5360.  
  5361. } //  DrawWindow()
  5362.  
  5363. (eom)
  5364.  
  5365. Internet: waldorfm@rferl.org
  5366.  
  5367.  
  5368.  
  5369.  
  5370.  
  5371.  
  5372. >From mauricio@mozart.aero.ufl.edu 23 May 94 02:40:08 GMT
  5373. Path: ucivax!gateway
  5374. From: mauricio@mozart.aero.ufl.edu (Mauricio Tavares)
  5375. Subject: Re: Reading data from a file
  5376. Message-ID: <9405221940.aa14527@q2.ics.uci.edu>
  5377. X-Mailer: ELM [version 2.3 PL2]
  5378. Newsgroups: fa.think-c
  5379. X-Message-ID: <9405230239.AA28868@mozart.aero.ufl.edu>
  5380. Approved: usenet@q2.ics.uci.edu
  5381. Lines: 37
  5382. Date: 23 May 94 02:40:08 GMT
  5383.  
  5384.  
  5385.         Ok, I think some of you are still kind of confused about what i
  5386. want *and* I am confused about your explanations to my problem.  So, let us
  5387. go to shock treatment.  Here is my original code (uses stdio.h):
  5388.  
  5389. /**********************************************************************
  5390.  *
  5391.  * Function ReadData.c
  5392.  *      Reads data from input file
  5393.  *
  5394.  **********************************************************************/
  5395.  
  5396. #include "Astro.h"
  5397.  
  5398. void ReadData(file, data)
  5399.  
  5400. FILE* file;
  5401. inputDataFormat *data;
  5402. {
  5403.         double time, dnu, mu;
  5404.         double r1[3], r2[3];
  5405.  
  5406.         fscanf(file, "%lf\n", &(data->dt));
  5407.         fscanf(file, "%lf\n", &(data->dnu));
  5408.         fscanf(file, "%le", &(data->mu));
  5409.  
  5410.         fscanf(file,"%le %le %le", &(data->r1[0]), &(data->r1[1]),
  5411.                                    &(data->r1[2]));       /* Get vector r1 */
  5412.         fscanf(file,"%le %le %le", &(data->r2[0]), &(data->r2[1]),
  5413.                                    &(data->r2[2]));       /* Get vector r2 */
  5414.  
  5415. }
  5416.  
  5417. What should I do to make it use the Mac routines such as FSRead()?  I read
  5418. IM over and over but did not find anything that could help me with my
  5419. problem.  As usual, suggestions are welcome.
  5420.  
  5421. >From TPZ4@vm.cnuce.cnr.it 23 May 94 06:48:33 GMT
  5422. Path: ucivax!gateway
  5423. From: TPZ4@vm.cnuce.cnr.it (Rodolfo Cardarelli)
  5424. Subject: Tools Plus Info
  5425. Message-ID: <9405222348.aa19605@q2.ics.uci.edu>
  5426. Newsgroups: fa.think-c
  5427. X-Message-ID: <9405222348.aa19605@q2.ics.uci.edu>
  5428. Approved: usenet@q2.ics.uci.edu
  5429. Lines: 6
  5430. Date: 23 May 94 06:48:33 GMT
  5431.  
  5432. I downloaded the shareware version of Tools Plus, and I took a look at the
  5433. manual. Did anibody tried the package before? It looks like once you've
  5434. started using it, you can't mix it with "tandard" Think C programming, or
  5435. even TCL.
  5436. I'd appreciate any opinion. Thank you
  5437. Rodolfo Cardarelli
  5438. >From andy.law@afrc.ac.uk 23 May 94 08:11:35 GMT
  5439. Path: ucivax!gateway
  5440. From: andy.law@afrc.ac.uk (Big Nose)
  5441. Subject: Drag & Drop. How?
  5442. X400-Originator: andy.law@afrc.ac.uk
  5443. Content-Identifier: 1185BA471100
  5444. Message-ID: <9405230111.aa22251@q2.ics.uci.edu>
  5445. X400-Recipients: think-c@ics.uci.edu
  5446. Sensitivity: Company-Confidential
  5447. Newsgroups: fa.think-c
  5448. X-Message-ID: <2121100923051994/A02109/IAPE/1185BA471100*@MHS>
  5449. X400-Received: by mta sun2.mhs-relay.ac.uk in /PRMD=uk.ac/ADMD= /C=gb/; Relayed; Mon, 23 May 1994 09:10:42 +0100
  5450. X400-Received: by mta arcs.afrc.ac.uk in /PRMD=UK.AC/ADMD= /C=GB/; Relayed; Mon, 23 May 1994 09:12:17 +0100
  5451. X400-Received: by /PRMD=UK.AC/ADMD= /C=GB/; converted (ia5 text (2)); Relayed; Mon, 23 May 1994 10:10:26 +0100
  5452. Approved: usenet@q2.ics.uci.edu
  5453. X400-Content-Type: P2-1988 (22)
  5454. Lines: 15
  5455. Date: 23 May 94 08:11:35 GMT
  5456. X400-MTS-Identifier: [/PRMD=UK.AC/ADMD= /C=GB/;2121100923051994/A02109/IAPE]
  5457.  
  5458.  
  5459. How the hell do I get the Finder to give my App Drag & Drop startup.
  5460. I have an app that receives AppleEvents and I want to let the user
  5461. drag a number of files onto its icon and just sit back while it
  5462. processes them. I assume that this is acheived through the 'odoc'
  5463. Event. However, the Finder steadfastly refuses to let me launch with
  5464. D&D. I have the acceptHighLevelEvents bit set in the SIZE -1 resource.
  5465.  
  5466. What else do I have to do?
  5467.  
  5468. Thanks,
  5469.  
  5470. Andy Law
  5471.  
  5472. ( Lawa @ afrc.ac.uk                         Big Nose in Edinburgh )
  5473. >From rmah@panix.com 23 May 94 12:29:12 GMT
  5474. Path: ucivax!gateway
  5475. From: rmah@panix.com ("Robert S. Mah")
  5476. Subject: Re: Drag & Drop. How?
  5477. Message-ID: <9405230529.aa11744@q2.ics.uci.edu>
  5478. Content-Type: text/plain; charset="us-ascii"
  5479. Mime-Version: 1.0
  5480. Newsgroups: fa.think-c
  5481. X-Message-ID: <199405231228.AA17397@panix.com>
  5482. Approved: usenet@q2.ics.uci.edu
  5483. Lines: 20
  5484. Date: 23 May 94 12:29:12 GMT
  5485.  
  5486. At  8:11 AM 5/23/94 +0000, Big Nose wrote:
  5487. > How the hell do I get the Finder to give my App Drag & Drop startup.
  5488. > I have an app that receives AppleEvents and I want to let the user
  5489. > drag a number of files onto its icon and just sit back while it
  5490. > processes them. I assume that this is acheived through the 'odoc'
  5491. > Event. However, the Finder steadfastly refuses to let me launch with
  5492. > D&D. I have the acceptHighLevelEvents bit set in the SIZE -1 resource.
  5493.  
  5494. Double check your BNDL information.  And then if that's OK, rebuild
  5495. the desktop.  The Finder searches the desktop for the BNDL info, so
  5496. you have to rebuild it every time you change the BNDL if you want
  5497. Finder to know about it.
  5498.  
  5499. Cheers,
  5500. Rob
  5501.  
  5502. ___________________________________________________________________________
  5503. Robert S. Mah  -=-  One Step Beyond  -=-  212-947-6507  -=-  rmah@panix.com
  5504.  
  5505.  
  5506. >From canna@bga.com 23 May 94 14:10:58 GMT
  5507. Path: ucivax!gateway
  5508. From: canna@bga.com (Lloyd Sargent)
  5509. Subject: Re: Drag & Drop. How?
  5510. Message-ID: <9405230710.aa14960@q2.ics.uci.edu>
  5511. Content-Type: text/plain; charset="us-ascii"
  5512. Mime-Version: 1.0
  5513. Newsgroups: fa.think-c
  5514. X-Message-ID: <199405231410.AA03546@zoom.bga.com>
  5515. Approved: usenet@q2.ics.uci.edu
  5516. Lines: 73
  5517. Date: 23 May 94 14:10:58 GMT
  5518.  
  5519. >How the hell do I get the Finder to give my App Drag & Drop startup.
  5520. >I have an app that receives AppleEvents and I want to let the user
  5521. >drag a number of files onto its icon and just sit back while it
  5522. >processes them. I assume that this is acheived through the 'odoc'
  5523. >Event. However, the Finder steadfastly refuses to let me launch with
  5524. >D&D. I have the acceptHighLevelEvents bit set in the SIZE -1 resource.
  5525. >
  5526. >What else do I have to do?
  5527. >
  5528. >Thanks,
  5529. >
  5530. >Andy Law
  5531. >
  5532. >( Lawa @ afrc.ac.uk                         Big Nose in Edinburgh )
  5533.  
  5534. More. Lots more.
  5535.  
  5536. On page 9-17 of IM 6, you will find a good explanation of what you have to
  5537. do to add drag and drop. Basically what you do is add another item to your
  5538. FREF resource and BNDL resource (I prefer to use ResEdit to do this. Edit
  5539. the BNDL resource, then select the Extended View under the BNDL menu).
  5540. This resource details what can be dropped on your application.  For
  5541. example, let us say that this is what ResEdit displays to you (roughly)
  5542.  
  5543.   FREF                 FINDER ICONS
  5544.  --------------------+-----------------------------------------------------
  5545.  local  ResID  Type  |  local  ResID  ICN#  icl4  icl8  ics#  ics4  ics8
  5546.  --------------------+-----------------------------------------------------
  5547.    0     128   APPL  |    0     128   [icon] []    []    []    []     []
  5548.  --------------------------------------------------------------------------
  5549.  
  5550. Okay, lets say you want to drop items of type TEXT.  You would add the
  5551. following:
  5552.  
  5553.  --------------------+-----------------------------------------------------
  5554.    1     129   TEXT  |    1     129     []   []    []    []    []     []
  5555.  --------------------------------------------------------------------------
  5556.  
  5557. Now you can drop anything that has the type 'TEXT' (Teachtext documents for
  5558. example!).  For a disk (hard and floppy), it is 'disk'. For folders it is
  5559. 'fold'.  Using '****' allows you to drop everything EXCEPT disks or
  5560. folders. If you want to drop any possible thing, then adjust BNDL (and
  5561. FREF) to look like the following:
  5562.  
  5563.   FREF                 FINDER ICONS
  5564.  --------------------+-----------------------------------------------------
  5565.  local  ResID  Type  |  local  ResID  ICN#  icl4  icl8  ics#  ics4  ics8
  5566.  --------------------+-----------------------------------------------------
  5567.    0     128   APPL  |    0     128   [icon] []    []    []    []     []
  5568.  --------------------------------------------------------------------------
  5569.    1     129   ****  |    1     129   [icon] []    []    []    []     []
  5570.  --------------------------------------------------------------------------
  5571.    2     130   fold  |    2     130   [icon] []    []    []    []     []
  5572.  --------------------------------------------------------------------------
  5573.    3     131   disk  |    3     131   [icon] []    []    []    []     []
  5574.  --------------------------------------------------------------------------
  5575.  
  5576. As far as I can remember, this is ALL you have to do!
  5577.  
  5578. Good luck,
  5579.  
  5580. Lloyd
  5581.  
  5582. ----------------------------+-----------------------------------------
  5583. Lloyd Sargent               | "On Internet no one can hear you scream"
  5584. Head Honcho                 | Internet:  canna@bga.com
  5585. Canna Software Development  | AOL:       lgsargent@aol.com
  5586. 14308-B FM 812              | Phone:     (512) 243-0283, (512) 243-3355
  5587. Del Valle, Texas 78617      | Fax:       (512) 243-0283  (8-5 CST)
  5588.  
  5589.     "My company believes in First Admendment rights. So there!"
  5590.  
  5591.  
  5592. >From bkirsch@nadc.nadc.navy.mil 23 May 94 14:18:34 GMT
  5593. Path: ucivax!gateway
  5594. From: bkirsch@nadc.nadc.navy.mil ("B. Kirsch")
  5595. Subject: Mixing C and C++
  5596. Message-ID: <9405230718.aa15134@q2.ics.uci.edu>
  5597. Newsgroups: fa.think-c
  5598. X-Message-ID: <9405231417.AA14726@NADC.NADC.NAVY.MIL>
  5599. Approved: usenet@q2.ics.uci.edu
  5600. Lines: 11
  5601. Date: 23 May 94 14:18:34 GMT
  5602.  
  5603.  
  5604. I am writing a C program and one of my modules probably could be better
  5605. programmed with C Objects using C++.  If I want to use those classes in
  5606. other modules in my project, do I also have to rename those files with
  5607. the .cpp extension to use the Sym C++ translator?  If I have only one .cpp
  5608. file in the project, do all of the other ones in the project have to be .cpp?
  5609.  
  5610.  
  5611. Thanks,
  5612. Barry Kirsch
  5613. bkirsch@nadc.navy.mil
  5614. >From STEVETRO@wordperfect.com 23 May 94 15:56:13 GMT
  5615. Path: ucivax!gateway
  5616. From: STEVETRO@wordperfect.com (Steve Trottier)
  5617. Subject: Re: Drag & Drop. How?
  5618. Message-ID: <9405230856.aa19482@q2.ics.uci.edu>
  5619. X-Mailer: WordPerfect Office 4.1
  5620. Newsgroups: fa.think-c
  5621. X-Message-ID: <sde07ebb.032@wordperfect.com>
  5622. Approved: usenet@q2.ics.uci.edu
  5623. Lines: 8
  5624. Date: 23 May 94 15:56:13 GMT
  5625.  
  5626.  The finder checks an applications 'FREF' resources to determine if a
  5627.  file can be dropped onto it.  When you create your 'BNDL' resource
  5628.  correctly, ResEdit should automatically generate the needed 'FREF'
  5629.  resources.
  5630.  
  5631.  Steve Trottier <stevetro@wordperfect.com>
  5632.  
  5633.  
  5634. >From D.Thomas@vthrc.uq.edu.au 23 May 94 23:28:02 GMT
  5635. Path: ucivax!gateway
  5636. From: D.Thomas@vthrc.uq.edu.au (Danny Thomas)
  5637. Subject: Re: Reading data from a file
  5638. X-Sender: thomas@pop3.vthrc.uq.oz.au.
  5639. Message-ID: <9405231628.aa16113@q2.ics.uci.edu>
  5640. Content-Type: text/plain; charset="us-ascii"
  5641. Mime-Version: 1.0
  5642. Newsgroups: fa.think-c
  5643. X-Message-ID: <199405232327.JAA13314@xroads.vthrc.uq.oz.au>
  5644. Approved: usenet@q2.ics.uci.edu
  5645. Lines: 32
  5646. Date: 23 May 94 23:28:02 GMT
  5647.  
  5648. >        Ok, I think some of you are still kind of confused about what i
  5649. >want *and* I am confused about your explanations to my problem.  So, let us
  5650. >go to shock treatment.  Here is my original code (uses stdio.h):
  5651. >
  5652. >/**********************************************************************
  5653. > *
  5654. > * Function ReadData.c
  5655. > *      Reads data from input file
  5656. > *
  5657. > **********************************************************************/
  5658. >
  5659. >#include "Astro.h"
  5660. >
  5661. >void ReadData(file, data)
  5662. >
  5663. >FILE* file;
  5664. >inputDataFormat *data;
  5665. >{
  5666. >        double time, dnu, mu;
  5667. >        double r1[3], r2[3];
  5668. >
  5669. >        fscanf(file, "%lf\n", &(data->dt));
  5670. >        fscanf(file, "%lf\n", &(data->dnu));
  5671. this code is fragile if you're not checking for errors, ie that the number
  5672. of successful conversions equals the number of values you're trying to
  5673. read.
  5674.  
  5675.  
  5676. cheers,
  5677. Danny Thomas  (D.Thomas@vthrc.uq.edu.au)
  5678.  
  5679.  
  5680. >From jean-marie.laborde@imag.fr 24 May 94 19:02:18 GMT
  5681. Path: ucivax!gateway
  5682. From: jean-marie.laborde@imag.fr (Jean-Marie Laborde)
  5683. Subject: Adressing memory screen
  5684. X-Sender: laborde@isis.imag.fr
  5685. Message-ID: <9405241202.aa13381@q2.ics.uci.edu>
  5686. Content-Type: text/plain; charset="us-ascii"
  5687. Mime-Version: 1.0
  5688. Newsgroups: fa.think-c
  5689. X-Message-ID: <199405241902.AA22679@isis.imag.fr>
  5690. Approved: usenet@q2.ics.uci.edu
  5691. Lines: 25
  5692. Date: 24 May 94 19:02:18 GMT
  5693.  
  5694. It is not recommanded to write directly in the memory screen but some
  5695. time we need to do that.
  5696.  
  5697. We managed for some graphics intensive application to use the
  5698. correct baseAddr of the screen bit(pix)map related to most
  5699. of the standard (Apple) monitors used for main device as
  5700.         screenBits.baseAddr.
  5701.  
  5702. Unfortunately on some (especially non Apple) monitors connected
  5703. (especially on not 32 bits machines) this does not work.
  5704. Does anyone knows about writing outside of the 24-bit world on
  5705. a 24 bit machine?
  5706. (In such cases tricks using  SwapMMUMode() does not work...)
  5707.  
  5708.  
  5709.  
  5710. ****************************************************************************
  5711. Jean-Marie Laborde                                       jean-marie.laborde@imag.fr
  5712. Responsable du Projet IMAG Cabri-geometre
  5713. Laboratoire de Structures Discretes et de Didactique - IMAG
  5714. Universite Joseph Fourier - CNRS          BP 53 38041 Grenoble cedex 9 FRANCE
  5715. (33) 76 51 46 10   (sec 76 51 46 16)      (fax 76 51 45 55)
  5716. ****************************************************************************
  5717.  
  5718.  
  5719. >From canna@bga.com 24 May 94 21:45:09 GMT
  5720. Path: ucivax!gateway
  5721. From: canna@bga.com (Lloyd Sargent)
  5722. Subject: Swapping out the Switchboard in TCLibs
  5723. X-Sender: canna@bga.com (Unverified)
  5724. Message-ID: <9405241445.aa22999@q2.ics.uci.edu>
  5725. Content-Type: text/plain; charset="us-ascii"
  5726. Mime-Version: 1.0
  5727. Newsgroups: fa.think-c
  5728. X-Message-ID: <199405242144.AA05562@zoom.bga.com>
  5729. Approved: usenet@q2.ics.uci.edu
  5730. Lines: 18
  5731. Date: 24 May 94 21:45:09 GMT
  5732.  
  5733. I am attempting to swap out the Switchboard by subclassing my own.
  5734. However, I seem to be having little luck. Is there anyone out there who has
  5735. done this and can give me a few pointers?
  5736.  
  5737. TIA,
  5738.  
  5739. Lloyd
  5740.  
  5741. ----------------------------+-----------------------------------------
  5742. Lloyd Sargent               | "On Internet no one can hear you scream"
  5743. Head Honcho                 | Internet:  canna@bga.com
  5744. Canna Software Development  | AOL:       lgsargent@aol.com
  5745. 14308-B FM 812              | Phone:     (512) 243-0283, (512) 243-3355
  5746. Del Valle, Texas 78617      | Fax:       (512) 243-0283  (8-5 CST)
  5747.  
  5748.     "My company believes in First Admendment rights. So there!"
  5749.  
  5750.  
  5751. >From kirk_crawford@qmail2.aero.org 25 May 94 00:50:08 GMT
  5752. Path: ucivax!gateway
  5753. From: kirk_crawford@qmail2.aero.org (Kirk Crawford)
  5754. Subject: Debugger LockUp
  5755. Message-ID: <9405241750.aa02796@q2.ics.uci.edu>
  5756. Newsgroups: fa.think-c
  5757. X-Message-ID: <94May24.174944pdt.111117-1@aero.org>
  5758. Approved: usenet@q2.ics.uci.edu
  5759. Lines: 12
  5760. Date: 25 May 94 00:50:08 GMT
  5761.  
  5762. Subject:  Debugger LockUp
  5763. I recently upgraded my TC6 to TC7.  It worked for a few days, but now when I
  5764. turn on the Debugger and run my project the Think C locks up when it looks like
  5765. it is launching the debugger.  I don't even get the source and data windows,
  5766. just a blank menu bar.  I replaced the debugger with my backup and that failed
  5767. too.  Any ideas?
  5768.  
  5769. Kirk Crawford
  5770. crawford@aero.org
  5771.  
  5772.  
  5773.  
  5774. >From fstiffo@unive.it 25 May 94 03:48:19 GMT
  5775. Path: ucivax!gateway
  5776. From: fstiffo@unive.it (Francesco Stiffoni)
  5777. Subject: TCL 2.0.1
  5778. Message-ID: <9405242048.aa09081@q2.ics.uci.edu>
  5779. Content-Type: text/plain; charset="us-ascii"
  5780. Mime-Version: 1.0
  5781. Newsgroups: fa.think-c
  5782. X-Message-ID: <199405240621.AA29218@vega.cicsd.unive.it>
  5783. Approved: usenet@q2.ics.uci.edu
  5784. Lines: 12
  5785. Date: 25 May 94 03:48:19 GMT
  5786.  
  5787. Where can I get TCL 2.0.1. I know that Symantec distributes it with CDK
  5788. because TCL 2.0 doesn't compile well on PowerPC. Even if it has no real
  5789. anhacements perhaps TCL 2.0.1 corrects some bugs of TCL 2.0.
  5790.  
  5791. Thanks in advance for information
  5792.  
  5793. Francesco Stiffoni
  5794. University of Venice
  5795. Linguistic Department
  5796. Laboratory of Computational Linguistic
  5797.  
  5798.  
  5799. >From Mhteas@aol.com 25 May 94 03:53:29 GMT
  5800. Path: ucivax!gateway
  5801. From: Mhteas@aol.com
  5802. Subject: Re: Reading data from a file.
  5803. Message-ID: <9405242053.aa09297@q2.ics.uci.edu>
  5804. X-Mailer: America Online Mailer
  5805. Newsgroups: fa.think-c
  5806. X-Message-ID: <9405242151.tn451276@aol.com>
  5807. Approved: usenet@q2.ics.uci.edu
  5808. Lines: 40
  5809. Date: 25 May 94 03:53:29 GMT
  5810.  
  5811. Marcio says:
  5812.  
  5813. > Ok, I think some of you are still kind of confused about what i
  5814. >want *and* I am confused about your explanations to my problem.  >So, let us
  5815. >go to shock treatment.  Here is my original code (uses stdio.h):
  5816.  
  5817. I'm not sure we're the one's confused, *you* came here with a problem, not
  5818. the other way around :)
  5819.  
  5820. The answer is quite simple. I'd aready emailed it privately to marcio
  5821. earlier.
  5822.  
  5823. Don't use fscanf().  This reads from UNIX-style (stdio-style) files.  You
  5824. want to use FSRead(), so use it!  Read the data into an in-memory buffer.
  5825.  Then use another ANSI library call, sscanf() to do the same thing fscanf()
  5826. does, but reads the data from memory instead of from a file.  This is a
  5827. standard buffering scheme.
  5828.  
  5829. Moral: Know your libraries.  Also, get decent reference books.
  5830.  
  5831. A side effect of using FSRead() (or the more appropriate call FSpRead()) is
  5832. that you can control the amount of data you read at a time.  The Mac (like
  5833. most OS's) has a fair amount of overhead for reading one byte off of the
  5834. disk, but spread this relatively fixed amount of overhead across reading
  5835. hundreds of bytes at a time and your application speeds up.  It may not be an
  5836. issue in this app, but it's a nice thing to know about.
  5837.  
  5838. Using the ANSI calls to read and write data does two things: It adds a layer
  5839. of calls over the existing FSxxx() calls that actually read the data.  And it
  5840. removes the control over buffering from you to the library.  I've not looked
  5841. at the recent library's sources, but in Think 5, it was relatively
  5842. ineffecient.
  5843.  
  5844. Hope that's detailed enough :)
  5845.  
  5846. Malcolm Teas
  5847. "Relax, it's only ones and zeros..."
  5848. Teas Technology - Custom software for the Mac and Newton.
  5849. Internet: "mhteas@aol.com" AppleLink or AOL: "mhteas"
  5850.  
  5851. >From Mhteas@aol.com 25 May 94 03:53:42 GMT
  5852. Path: ucivax!gateway
  5853. From: Mhteas@aol.com
  5854. Subject: Re: Tools Plus Info
  5855. Message-ID: <9405242053.aa09316@q2.ics.uci.edu>
  5856. X-Mailer: America Online Mailer
  5857. Newsgroups: fa.think-c
  5858. X-Message-ID: <9405242151.tn451282@aol.com>
  5859. Approved: usenet@q2.ics.uci.edu
  5860. Lines: 8
  5861. Date: 25 May 94 03:53:42 GMT
  5862.  
  5863. What's Tools Plus do?  Can you tell us a little about it's purpose and
  5864. features?
  5865.  
  5866. Malcolm Teas
  5867. "Relax, it's only ones and zeros..."
  5868. Teas Technology - Custom software for the Mac and Newton.
  5869. Internet: "mhteas@aol.com" AppleLink or AOL: "mhteas"
  5870.  
  5871. >From monty@roscom.com 25 May 94 05:06:35 GMT
  5872. Path: ucivax!gateway
  5873. From: monty@roscom.com (Monty Solomon)
  5874. Subject: MPW Tools
  5875. Message-ID: <9405242206.aa11502@q2.ics.uci.edu>
  5876. Content-Type: text/plain; charset="us-ascii"
  5877. Mime-Version: 1.0
  5878. Newsgroups: fa.think-c
  5879. X-Message-ID: <199405250455.AA01569@roscom.COM>
  5880. Approved: usenet@q2.ics.uci.edu
  5881. Lines: 16
  5882. Date: 25 May 94 05:06:35 GMT
  5883.  
  5884. The Symantec C++ box states that it supports MPW tools.  I can't seem to find
  5885. any information about this in the manuals.
  5886.  
  5887. What is the procedure for writing a MPW tool so that it can be used in the
  5888. Symantec C++/Think C environment?
  5889.  
  5890. Thanks.
  5891.  
  5892. Monty
  5893.  
  5894.  
  5895. ---
  5896. # Monty Solomon / PO Box 2486 / Framingham, MA  01701-0405
  5897. # monty@roscom.com
  5898.  
  5899.  
  5900. >From Lance.Helsten@m.cc.utah.edu 25 May 94 15:01:39 GMT
  5901. Path: ucivax!gateway
  5902. From: Lance.Helsten@m.cc.utah.edu (Lance Helsten)
  5903. Subject: Re: Reading data from a file.
  5904. Message-ID: <9405250801.aa13181@q2.ics.uci.edu>
  5905. In-Reply-To: <9405242053.aa09297@q2.ics.uci.edu>
  5906. Content-Type: TEXT/PLAIN; charset=US-ASCII
  5907. MIME-Version: 1.0
  5908. Newsgroups: fa.think-c
  5909. X-Message-ID: <Pine.3.07.9405250848.D21359-a100000@u.cc.utah.edu>
  5910. Approved: usenet@q2.ics.uci.edu
  5911. Lines: 18
  5912. Date: 25 May 94 15:01:39 GMT
  5913.  
  5914. > Don't use fscanf().  This reads from UNIX-style (stdio-style) files.  You
  5915. > want to use FSRead(), so use it!  Read the data into an in-memory buffer.
  5916. >  Then use another ANSI library call, sscanf() to do the same thing fscanf()
  5917. > does, but reads the data from memory instead of from a file.  This is a
  5918. > standard buffering scheme.
  5919. >
  5920.  
  5921. I agree with you on FSRead/FSWrite when you are writing mac only files
  5922. because writing to binary files is 40 to 80 times faster than fscanf. But,
  5923. if you need the file to go from platform to platform Text files are
  5924. usually the best (no byte swapping--big/little endian problems) though
  5925. MUCH slower. So a mixture of both of these are needed in any application.
  5926.  
  5927. Lance
  5928. Chief Engineer
  5929. dBL Software
  5930.  
  5931.  
  5932. >From kirk_crawford@qmail2.aero.org 25 May 94 16:59:06 GMT
  5933. Path: ucivax!gateway
  5934. From: kirk_crawford@qmail2.aero.org (Kirk Crawford)
  5935. Subject: Debugger LockUp Summary
  5936. Message-ID: <9405250959.aa20420@q2.ics.uci.edu>
  5937. Newsgroups: fa.think-c
  5938. X-Message-ID: <94May25.095853pdt.111163-3@aero.org>
  5939. Approved: usenet@q2.ics.uci.edu
  5940. Lines: 21
  5941. Date: 25 May 94 16:59:06 GMT
  5942.  
  5943. Subject:  Debugger LockUp Summary
  5944. Thanks to the quick help from the kind people on this list I have solved my
  5945. previous problem of the Debugger locking up when I tried to run with the
  5946. debugger.  I replaced the Think Project Manager and Think Debugger files with
  5947. the original ones from my virgin 6.0 disks, and then patched them.  It works
  5948. fine now.
  5949.  
  5950. Thanks especially to Marco Sandri  (msandri@netcom.com)
  5951.  
  5952. Some thought the project file might have been corrupt, but the bug showed on
  5953. ALL my old projects and I made a new project with a Hello World program and
  5954. that failed too.
  5955.  
  5956. BTW:
  5957. There is a bad address in the list.  I got an automated response from
  5958. mikekmg@novalink.com it seems his address needs to be changed to
  5959. MikeL@eWorld.com.
  5960.  
  5961. -Kirk
  5962.  
  5963.  
  5964. >From Brian.Bezanson@macsrv.mgi.com 25 May 94 17:27:13 GMT
  5965. Path: ucivax!gateway
  5966. From: Brian.Bezanson@macsrv.mgi.com (Brian Bezanson)
  5967. Subject: RE>MPW Tools
  5968. Message-ID: <9405251027.aa22077@q2.ics.uci.edu>
  5969. X-Mailer: InterCon Dispatcher/SMTP for QuickMail
  5970. Newsgroups: fa.think-c
  5971. X-Message-ID: <199405251227588739@macsrv.mgi.com>
  5972. Approved: usenet@q2.ics.uci.edu
  5973. X-Priority: 4
  5974. Lines: 60
  5975. Date: 25 May 94 17:27:13 GMT
  5976.  
  5977. Date    5/25/94
  5978. Subject RE>MPW Tools
  5979. From    Brian Bezanson
  5980. To      Monty Solomon, think-c
  5981.  
  5982.         Reply to:   RE>MPW Tools
  5983. It can't dirtectly use MPW Tools or even create them. It can run then using
  5984. ToolServer or SourceServer--this is/should be documented in the manuals.
  5985.  
  5986. Brian
  5987.  
  5988. --------------------------------------
  5989. Date: 5/25/94 2:47 AM
  5990. To: Brian Bezanson
  5991. From: Monty Solomon
  5992. Resent-Date: Wed, 25 May 1994 02:44:02 CDT
  5993. Resent-From: <bezanson@vixvax.mgi.com>
  5994. Resent-To: <BEZANSON@MACSRV>
  5995. Received: from binky.ics.uci.edu by VIXVAX.MGI.COM (MX V3.3 VAX) with SMTP;
  5996.           Wed, 25 May 1994 02:43:58 CDT
  5997. Received: from ics.uci.edu by binky.ics.uci.edu id aa08663; 24 May 94 22:08
  5998. PDT
  5999. Received: from ics.uci.edu by binky.ics.uci.edu id aa08659; 24 May 94 22:06
  6000. PDT
  6001. Received: from USENET by q2.ics.uci.edu id aa11522; 24 May 94 22:06 PDT
  6002. From: Monty Solomon <monty@roscom.com>
  6003. Subject: MPW Tools
  6004. Message-ID: <9405242206.aa11502@q2.ics.uci.edu>
  6005. Content-Type: text/plain; charset="us-ascii"
  6006. MIME-Version: 1.0
  6007. Newsgroups: fa.think-c
  6008. X-Message-ID: <199405250455.AA01569@roscom.COM>
  6009. Approved: usenet@q2.ics.uci.edu
  6010. Date: 25 May 94 05:06:35 GMT
  6011. To: think-c@ics.UCI.EDU
  6012.  
  6013.  
  6014. The Symantec C++ box states that it supports MPW tools.  I can't seem to find
  6015.  
  6016. any information about this in the manuals.
  6017.  
  6018. What is the procedure for writing a MPW tool so that it can be used in the
  6019. Symantec C++/Think C environment?
  6020.  
  6021. Thanks.
  6022.  
  6023. Monty
  6024.  
  6025.  
  6026. ---
  6027. # Monty Solomon / PO Box 2486 / Framingham, MA  01701-0405
  6028. # monty@roscom.com
  6029.  
  6030.  
  6031.  
  6032.  
  6033.  
  6034.  
  6035.  
  6036.  
  6037. >From swenson@skivs.ski.org 25 May 94 18:33:42 GMT
  6038. Path: ucivax!gateway
  6039. From: swenson@skivs.ski.org (Kirk Swenson)
  6040. Subject: Re: Swapping out the Switchboard in TCLibs
  6041. Message-ID: <9405251133.aa26329@q2.ics.uci.edu>
  6042. Content-Type: text/plain; charset="us-ascii"
  6043. Mime-Version: 1.0
  6044. Newsgroups: fa.think-c
  6045. X-Message-ID: <9405251834.AA12527@skivs.ski.org>
  6046. Approved: usenet@q2.ics.uci.edu
  6047. Lines: 14
  6048. Date: 25 May 94 18:33:42 GMT
  6049.  
  6050. >I am attempting to swap out the Switchboard by subclassing my own.
  6051. >However, I seem to be having little luck. Is there anyone out there who has
  6052. >done this and can give me a few pointers?
  6053.  
  6054. Override CApplication::MakeSwitchboard() to create your specific subclass
  6055. of CSwitchboard and set CApplication's itsSwitchboard instance variable.
  6056. Works for me. :-)
  6057.  
  6058. Kirk Swenson
  6059. Smith-Kettlewell Eye Research Institute
  6060. San Francisco, CA
  6061. swenson@skivs.ski.org
  6062.  
  6063.  
  6064. >From jcaufiel@cln.etc.bc.ca 25 May 94 18:52:23 GMT
  6065. Path: ucivax!gateway
  6066. From: jcaufiel@cln.etc.bc.ca (Brent Taylor)
  6067. Subject: FSpExchangeFiles()
  6068. Message-ID: <9405251152.aa27568@q2.ics.uci.edu>
  6069. Newsgroups: fa.think-c
  6070. X-Message-ID: <9405251856.AA28202@cln.etc.bc.ca>
  6071. Approved: usenet@q2.ics.uci.edu
  6072. Lines: 41
  6073. Date: 25 May 94 18:52:23 GMT
  6074.  
  6075. I'm having difficulty implementing the "safe" save described in
  6076. NIM-"Files", p1.23-27.  SaveDataFile() receives a file specification for
  6077. the currently opened file.  GetTempSpec() returns a file specification for
  6078. a unique temporary file.  WriteTempFile() opens, writes, and closes the
  6079. temporary file.  FSpExchangeFiles() exchanges the opened file with the
  6080. temporary file.  IM6 and NIM-"Files" both state that FSpExchangeFiles()
  6081. will work on both opened and closed files.
  6082.  
  6083. My problem is that, after the exchange, I get fBsyErr (-47 file busy) on my
  6084. call to FSpDelete().  It would seem that the file referenced by tempSpec is
  6085. open, I suppose, as a result of my call to FSpExchangeFiles().
  6086.  
  6087. Can anyone elaborate on what specifically happens when FSpExchangeFiles()
  6088. exchanges an opened file with a closed file and, perhaps, recommend a
  6089. possible solution?
  6090.  
  6091.  
  6092. /******************************** SOURCE CODE ********************************/
  6093.  
  6094. OSErr SaveDataFile(FSSpecPtr fsSpec)
  6095. {
  6096.     FSSpec  tempSpec;
  6097.     OSErr   errNo;
  6098.  
  6099.     if ((errNo = GetTempSpec(fsSpec->vRefNum, &tempSpec)) == noErr)
  6100.         if ((errNo = FSpCreate(&tempSpec, 'ROCK', 'Rock',
  6101.                                         smSystemScript)) == noErr) {
  6102.             if ((errNo = WriteTempFile(&tempSpec)) == noErr)
  6103.                 if ((errNo = FSpExchangeFiles(&tempSpec, fsSpec)) == noErr)
  6104.                     return(FSpDelete(&tempSpec)); /* returns fBsyErr */
  6105.             FSpDelete(&tempSpec);
  6106.         }
  6107.     return(errNo);
  6108. }
  6109.  
  6110.  
  6111. __________________________________________________________________________
  6112. Brent Taylor, Computer Science / Math Teacher         Phone: (604)865-4674
  6113. Elkford Secondary School                                Fax: (604)865-2915
  6114. Box 910, Elkford, BC, Canada  V0B 1H0               jcaufiel@cln.etc.bc.ca
  6115.  
  6116. >From G.POLDER@cpro.agro.nl 26 May 94 07:08:06 GMT
  6117. Path: ucivax!gateway
  6118. From: G.POLDER@cpro.agro.nl
  6119. Subject: Using the Standard Libraries.
  6120. Message-ID: <9405260008.aa00847@q2.ics.uci.edu>
  6121. Content-transfer-encoding: 7BIT
  6122. Newsgroups: fa.think-c
  6123. X-Message-ID: <9405260707.AA03807@ganges.cpro.agro.nl.agro.nl>
  6124. Approved: usenet@q2.ics.uci.edu
  6125. Lines: 18
  6126. Date: 26 May 94 07:08:06 GMT
  6127. X-Envelope-to: think-c@ics.UCI.EDU
  6128.  
  6129. I'm converting some C code to the mac, which uses
  6130. a lot of Standard Libraries routines.
  6131. The code compiles ok, but unfortunately the program
  6132. crashes at some points, or does not work correct.
  6133.  
  6134. for instance:
  6135.  
  6136. I can not write to stderr using fprintf(stderr,".......
  6137.  
  6138. fgets(...) returns NULL, while fgetc or fscanf on the same stream
  6139. works well.
  6140.  
  6141. vprintf(.....) gives unpredictable results.
  6142.  
  6143. I use Think_c 5.0.4.
  6144. Any idea whats wrong?
  6145.  
  6146. Gerrit.
  6147. >From jaha@secrc.abb.se 26 May 94 07:20:43 GMT
  6148. Path: ucivax!gateway
  6149. From: jaha@secrc.abb.se ("Jan R. M. Rohman")
  6150. Subject: Text and color
  6151. Message-ID: <9405260020.aa01450@q2.ics.uci.edu>
  6152. Newsgroups: fa.think-c
  6153. X-Message-ID: <9405260720.AA09712@kbmhp1.secrc.abb.se>
  6154. Reply-To: jaha@secrc.abb.se
  6155. Approved: usenet@q2.ics.uci.edu
  6156. Lines: 32
  6157. Date: 26 May 94 07:20:43 GMT
  6158.  
  6159.  
  6160. Hello,
  6161.  
  6162. I'm writing a nice application with 3-D buttons, input field (in
  6163. dialogs) with a 3-D look etc. Now I have some problems left before I
  6164. can distribute my program.
  6165.  
  6166. 1.) I made my input field light gray to have a nice look. But I
  6167. thought I should die when the prompter (text cursor) in the fields got
  6168. yellow. No normal human eyes can see the yellow prompter on the gray
  6169. background. How do I change the color of the prompter???
  6170.  
  6171. 2.) I plot functions and solutions to differential equations in a
  6172. window. Is there any free code, or have any body out there code to
  6173. make logarithmic coordinate axes.
  6174.  
  6175. 3.) At last I want to know how to draw (input) text at any position
  6176. in a window. When I have a plot of a function in my plotting window
  6177. I want a cursor to place at any position in the window for writing
  6178. text. Is there any body out there ("Pink Floyd") who have a snippet
  6179. to draw text???
  6180.  
  6181.         Please HELP Me.....
  6182.  
  6183. ----------------------------------------------------------------------
  6184.  From:  jaha@secrc.abb.se  Jan R. M. Rohman                          !
  6185.  Phone: +46 21 32 31 48    ABB Corporate Research Center Dept. KF    !
  6186.  Fax:   +46 21 32 31 01    Department of Computational Methods,      !
  6187.                            Electromagnetic Fields and Fluid Dynamics !
  6188.                            S-721 78 Vasteras, SWEDEN                 !
  6189.  Home:   Vasagatan 35, 722 15 Vasteras, Phone:  +46 21 83 06 00      !
  6190. ----------------------------------------------------------------------
  6191. >From de19@umail.umd.edu 26 May 94 14:27:52 GMT
  6192. Path: ucivax!gateway
  6193. From: de19@umail.umd.edu (Dana S Emery)
  6194. Subject: Re: Swapping out the Switchboard in TCLibs
  6195. Message-ID: <9405260727.aa26802@q2.ics.uci.edu>
  6196. In-Reply-To: Your message <9405251133.aa26329@q2.ics.uci.edu> of 25 May 94
  6197.  18:33:42 GMT
  6198. Content-Type: TEXT/plain; charset=US-ASCII
  6199. Newsgroups: fa.think-c
  6200. X-Message-ID: <Mailstrom.1.05.10770.-3114.de19@umailsrv0.umd.edu>
  6201. Approved: usenet@q2.ics.uci.edu
  6202. Lines: 41
  6203. Date: 26 May 94 14:27:52 GMT
  6204.  
  6205. >I am attempting to swap out the Switchboard by subclassing my own.
  6206. >However, I seem to be having little luck. Is there anyone out
  6207. >there who has
  6208. >done this and can give me a few pointers?
  6209.  
  6210. The switchboard is a mission critical part of the TCL.  Before tweaking it one
  6211. should do a thorough analysis of its behaviour and interactions (and potential
  6212. interactions) with the entirety of the TCL.  Hopefully this was obvious, but
  6213. still it needs to be said.
  6214.  
  6215. If the overhead of dispatching overloaded calls proves expensive
  6216. you will want to use a rewriten version of the TCl file, this is
  6217. easy enough (assuming you havent precompiled the switchboard),
  6218. simply remove the TCL version of CSwitchboard.c from your project,
  6219. then add your own rewritten version.  Many of the project files
  6220. will then need recompilation.
  6221.  
  6222. But if that overhead is affordable you can work more cleanly,
  6223. simply author a subclass of CSwitchboard to define overrides of
  6224. old methods and/or new methods which will accomplish your
  6225. desired behaviour.
  6226.  
  6227. v1.x TCL (and probably later versions as well) CApplication
  6228. provides a hook which makes it easy to integrate your subclass
  6229. of the switchboard, when CApplication wants to have the
  6230. switchboard object created it sends itself a message "MakeClipboard".
  6231.  
  6232. The CApplication subclass you _have_ to create anyway can override
  6233. this method in order to create and initialize the CSwitchboard
  6234. subclass you will be writing, an examination of the code inherited
  6235. CApplication::Makeclipboard method should reveal that you dont need
  6236. to invoke it, but you can take it for a model.  TCL 2.0 may have
  6237. decided to use templates for this, in which case you are on your
  6238. own, I don mess with them.
  6239.  
  6240. The "MakeXxx" concept is employed in several places in the TCL, it
  6241. is a common way to allow subclasses of yourself to provide subclasses
  6242. of the Xxx.
  6243. --
  6244. dana s emery <de19@umail.umd.edu>
  6245.  
  6246. >From hs47+@andrew.cmu.edu 26 May 94 18:55:48 GMT
  6247. Path: ucivax!gateway
  6248. From: hs47+@andrew.cmu.edu (Hong Shi)
  6249. Subject: Need Help: Mac Resource
  6250. Message-ID: <9405261155.aa11977@q2.ics.uci.edu>
  6251. Newsgroups: fa.think-c
  6252. X-Message-ID: <0htD1US00iUzI55kss@andrew.cmu.edu>
  6253. Approved: usenet@q2.ics.uci.edu
  6254. Lines: 17
  6255. Date: 26 May 94 18:55:48 GMT
  6256.  
  6257. I am new to Macintosh programming, and I found the concept of resource
  6258. somewhat difficult. In particular, I have the following questions:
  6259.  
  6260. 1. What's the exact role of resource in a program? In the think C
  6261. project manager, the list does not include resource file.
  6262. 2. How do I know I need some kinds of resource for my program?
  6263. 3. How to define and use resource? I read the part of ResEdit in Think C
  6264. manual, but it still kind of mystery to me, for the use, in Macintosh
  6265. Revealed, it described several ways to open and use resource files, but
  6266. I didn't find similar examples in the Think C package, although those
  6267. projects have their resource files. So it seems to me resource is
  6268. automatically been used. And if something is wrong with the resource, do
  6269. I have anyway to locate it?
  6270.  
  6271. Any help will be appreciated.
  6272.  
  6273. Hong Shi
  6274. >From pindar3@cix.compulink.co.uk 27 May 94 00:59:51 GMT
  6275. Path: ucivax!gateway
  6276. From: pindar3@cix.compulink.co.uk (Pindar Infotek Ltd)
  6277. Subject: Re- FSpExchangeFiles()
  6278. Message-ID: <9405261759.aa02470@q2.ics.uci.edu>
  6279. Newsgroups: fa.think-c
  6280. Reply-To: pindar3@cix.compulink.co.uk
  6281. X-Message-ID: <memo.214788@cix.compulink.co.uk>
  6282. Approved: usenet@q2.ics.uci.edu
  6283. Lines: 23
  6284. Date: 27 May 94 00:59:51 GMT
  6285.  
  6286.  
  6287. >From Pindar user Ian McCall
  6288.  
  6289. Subject: _Re: FSpExchangeFiles()
  6290. > My problem is that, after the exchange, I get fBsyErr (-47 file
  6291. > busy) on my call to FSpDelete().  It would seem that the file
  6292. > referenced by tempSpec is open, I suppose, as a result of my
  6293. > call to FSpExchangeFiles().
  6294.  
  6295. I had this, and it took me a while to see what was up. What's
  6296. happening is that although you've physically exchanged the files, any
  6297. fileRef you've got going from opening this file hasn't been swapped.
  6298.  
  6299. I found the only reliable method was to close both files. I'm sure I
  6300. took the easy route out and there's another way of doing it, but this
  6301. way certainly works.
  6302.  
  6303.  
  6304.  
  6305. ---
  6306. Please make 'Attn:<space>Ian McCall' the first line of your reply
  6307. (not the subject) to ensure automatic forwarding to the correct
  6308. Pindar user.
  6309. >From nagel@barracuda.rdatasys.com 27 May 94 02:22:56 GMT
  6310. Path: ucivax!gateway
  6311. From: nagel@barracuda.rdatasys.com ("Mark D. Nagel")
  6312. Subject: ARCHIVE: Symantec C++ 7.0.2 update
  6313. Message-ID: <9405261922.aa04998@q2.ics.uci.edu>
  6314. Newsgroups: fa.think-c
  6315. X-Message-ID: <29048.770004351@barracuda>
  6316. Reply-To: think-c-request@ics.uci.edu
  6317. Approved: usenet@q2.ics.uci.edu
  6318. Organization: Relational Data Systems, Irvine, CA
  6319. Lines: 12
  6320. Date: 27 May 94 02:22:56 GMT
  6321. Phone: (714) 263-3899
  6322.  
  6323. I have placed the update for THINK C/Symantec C++ 7.0.2 on
  6324. ftp.ics.uci.edu.  Please note that this update is _only_ for those
  6325. who updated from 6.0.x with publically available updaters.  I will
  6326. try to get the other updater (for people who bought 7.0) as soon as
  6327. possible.
  6328.  
  6329. [archived as: EDS_7.0.2_Update.sea.bin; 312K]
  6330. --------
  6331. Mark D. Nagel <mark.nagel@rdatasys.com>      Relational Data Systems
  6332.                                              30 Executive Park, Suite 260
  6333. Eat right.  Exercise.  Die anyway.           Irvine, CA 92714
  6334.                                              (714) 263-3899
  6335. >From SJKim@aol.com 27 May 94 03:51:38 GMT
  6336. Path: ucivax!gateway
  6337. From: SJKim@aol.com
  6338. Subject: ICON
  6339. Message-ID: <9405262051.aa07277@q2.ics.uci.edu>
  6340. X-Mailer: America Online Mailer
  6341. Newsgroups: fa.think-c
  6342. X-Message-ID: <9405262351.tn534637@aol.com>
  6343. Approved: usenet@q2.ics.uci.edu
  6344. Lines: 15
  6345. Date: 27 May 94 03:51:38 GMT
  6346.  
  6347. Hello,
  6348. I think this is a simple question for you guys.  Could anybody please tell me
  6349. how to create a custom icon for my application?  After build my application,
  6350. it always gives simple generic icon for the application.  I used ResEdit and
  6351. create an icon and made BNDL resource that has 'APPL' and the icon I created.
  6352.  And then I assinged arbitrary signature in the signature field(4 characters
  6353. long).  But still, I don't get the icon for my application.  Do I have to add
  6354. some code into my source code to do this?
  6355.  
  6356. Thanks...
  6357.  
  6358. sjkim@aol.com
  6359.  
  6360.  
  6361.  
  6362. >From ld11@tower.york.ac.uk 27 May 94 08:50:35 GMT
  6363. Path: ucivax!gateway
  6364. From: ld11@tower.york.ac.uk (Lindsay Davies)
  6365. Subject: Chooser name - where is it?
  6366. Message-ID: <9405270150.aa18275@q2.ics.uci.edu>
  6367. Newsgroups: fa.think-c
  6368. X-Message-ID: <9405270851.AA06056@tower.york.ac.uk>
  6369. Reply-To: Lindsay Davies <ld11@unix.york.ac.uk>
  6370. Approved: usenet@q2.ics.uci.edu
  6371. Lines: 11
  6372. Date: 27 May 94 08:50:35 GMT
  6373.  
  6374. This is something that has been niggling me for a while, and I have
  6375. never found out the answer.
  6376.  
  6377. How do I get the Chooser/Owner name that's set from the file sharing extension?
  6378. I have scoured IM and Think Ref, but can't seem to hit on the answer.
  6379.  
  6380. TIA
  6381.  
  6382. Lindsay
  6383.  
  6384.  
  6385. >From walrathw@rferl.org 27 May 94 10:58:33 GMT
  6386. Path: ucivax!gateway
  6387. From: walrathw@rferl.org (WalrathW)
  6388. Subject: RE: ICON
  6389. Message-ID: <9405270358.aa21255@q2.ics.uci.edu>
  6390. Content-transfer-encoding: 7BIT
  6391. Content-type: TEXT/PLAIN; CHARSET=US-ASCII
  6392. Newsgroups: fa.think-c
  6393. X-Message-ID: <01HCU24L1AEA8WWKVN@MUVAXA.RFERL.ORG>
  6394. Approved: usenet@q2.ics.uci.edu
  6395. Lines: 49
  6396. Date: 27 May 94 10:58:33 GMT
  6397.  
  6398. Try rebuilding your desktop (hold down cmd-option keys while rebooting your
  6399. mac). If that doesn't work than you must have screwed up somthing with the
  6400. resources. Make sure you also have an FREF resource (I think it gets created
  6401. when you make the BNDL, though). Go into another application's resources and
  6402. compare against theirs, making certain that yours looks more or less the same.
  6403.  
  6404. cheers,
  6405.   -wayne
  6406. _______________________________________________________________________________
  6407. From: SJKim@aol.com on Fri, May 27, 1994 10:48
  6408. Subject: ICON
  6409. To: think-c@ics.UCI.EDU
  6410.  
  6411. Hello,
  6412. I think this is a simple question for you guys.  Could anybody please tell me
  6413. how to create a custom icon for my application?  After build my application,
  6414. it always gives simple generic icon for the application.  I used ResEdit and
  6415. create an icon and made BNDL resource that has 'APPL' and the icon I created.
  6416.  And then I assinged arbitrary signature in the signature field(4 characters
  6417. long).  But still, I don't get the icon for my application.  Do I have to add
  6418. some code into my source code to do this?
  6419.  
  6420. Thanks...
  6421.  
  6422. sjkim@aol.com
  6423.  
  6424.  
  6425.  
  6426.  
  6427. ------------------ RFC822 Header Follows ------------------
  6428. Received: by mumcbm.rferl.org with SMTP;27 May 1994 10:46:48 U
  6429. Received: from moose.cs.indiana.edu by MUVAXA.RFERL.ORG (PMDF V4.2-12 #5010) id
  6430.  <01HCTXI5N1UO8WWI3S@MUVAXA.RFERL.ORG>; Fri, 27 May 1994 10:46:26 CET
  6431. Received: from binky.ics.uci.edu by moose.cs.indiana.edu (5.65c/9.4jsm) id
  6432.  AA10253; Fri, 27 May 1994 02:23:22 -0500
  6433. Received: from ics.uci.edu by binky.ics.uci.edu id aa27422; 26 May 94 20:54 PDT
  6434. Received: from ics.uci.edu by binky.ics.uci.edu id aa27418; 26 May 94 20:51 PDT
  6435. Received: from USENET by q2.ics.uci.edu id aa07291; 26 May 94 20:51 PDT
  6436. Date: Fri, 27 May 1994 03:51:38 +0000 (GMT)
  6437. From: SJKim@aol.com
  6438. Subject: ICON
  6439. To: think-c@ics.UCI.EDU
  6440. Message-id: <9405262051.aa07277@q2.ics.uci.edu>
  6441. X-Mailer: America Online Mailer
  6442. Content-type: TEXT/PLAIN; CHARSET=US-ASCII
  6443. Content-transfer-encoding: 7BIT
  6444. Newsgroups: fa.think-c
  6445. X-Message-Id: <9405262351.tn534637@aol.com>
  6446. Approved: usenet@q2.ics.uci.edu
  6447. >From nagel@rdatasys.rdatasys.com 27 May 94 16:23:16 GMT
  6448. Path: ucivax!gateway
  6449. From: nagel@rdatasys.rdatasys.com ("Mark D. Nagel")
  6450. Subject: Re: patch
  6451. Message-ID: <9405270923.aa16694@q2.ics.uci.edu>
  6452. In-reply-to: Craig Hollabaugh's message of Fri, 27 May 1994 01:54:37 MDT.
  6453.         <9405270756.AA04150@monique.adgrp.gatech.edu>
  6454. Newsgroups: fa.think-c
  6455. X-Message-ID: <13317.770055098@rdatasys>
  6456. Reply-To: mark.nagel@rdatasys.rdatasys.com
  6457. Approved: usenet@q2.ics.uci.edu
  6458. Organization: Relational Data Systems, Irvine, CA
  6459. Lines: 33
  6460. Date: 27 May 94 16:23:16 GMT
  6461. Phone: (714) 263-3899
  6462.  
  6463. On Fri, 27 May 1994 01:54:37 MDT Craig Hollabaugh wrote:
  6464.  
  6465.     Saw the patch to 7.0.2 and grabbed it.
  6466.  
  6467.     Got a "verify resource CNFG 0" error when going from 7.0.1
  6468.  
  6469.     So I converted a 6.0.1 to 7.0.1 then to 7.0.2, got the same
  6470.     error.
  6471.  
  6472.     Unfortunately, I'm on the road without my 6.0 disks, so I can't
  6473.     start with a "clean" version.
  6474.  
  6475.     Does the patch work for you? (Stupid question since you posted it) Are
  6476.     other people having the same problem?
  6477.  
  6478. I applied all of the patch modules without error except for the
  6479. Symantec C++ 7.0.2 patch.  It apparently requires a 7.0.1 version of
  6480. the translator, even though the AppleLink message containing the
  6481. update kit says it is for those who used the previously published
  6482. update.
  6483.  
  6484. I had not attempted the patch prior to uploading the archive, since
  6485. I retrieved the kit directly from AppleLink and (mistakenly) assumed
  6486. it had been tested first.  I'll upload an update as soon as it is
  6487. made available.
  6488.  
  6489. Mark
  6490.  
  6491. --------
  6492. Mark D. Nagel <mark.nagel@rdatasys.com>      Relational Data Systems
  6493.                                              30 Executive Park, Suite 260
  6494. Eat right.  Exercise.  Die anyway.           Irvine, CA 92714
  6495.                                              (714) 263-3899
  6496. >From Mhteas@aol.com 27 May 94 16:55:34 GMT
  6497. Path: ucivax!gateway
  6498. From: Mhteas@aol.com
  6499. Subject: Re: Reading data from a file.
  6500. Message-ID: <9405270955.aa18532@q2.ics.uci.edu>
  6501. X-Mailer: America Online Mailer
  6502. Newsgroups: fa.think-c
  6503. X-Message-ID: <9405252002.tn486724@aol.com>
  6504. Approved: usenet@q2.ics.uci.edu
  6505. Lines: 29
  6506. Date: 27 May 94 16:55:34 GMT
  6507.  
  6508. Lance says,
  6509.  
  6510. >I agree with you on FSRead/FSWrite when you are writing mac only files
  6511. >because writing to binary files is 40 to 80 times faster than fscanf. But,
  6512. >if you need the file to go from platform to platform Text files are
  6513. >usually the best (no byte swapping--big/little endian problems) though
  6514. >MUCH slower. So a mixture of both of these are needed in any application.
  6515.  
  6516. So use text and FSxxx() calls.  Like the beer commercials say: No need to
  6517. argue, you can have both.
  6518.  
  6519. FSxxx() calls just read and write bits.  Use the FSxxx() calls in a
  6520. platform-dependent layer to read and write buffers.  Use the sscanf() and
  6521. sprintf() calls to read and write the data in the buffers.
  6522.  
  6523. I've used this technique several times and it *does* work.  As Lance points
  6524. out, it's a lot faster too.
  6525.  
  6526. BTW, I've noticed that there's a large difference between writing 1-5 bytes
  6527. at a time to writing 100 bytes at a time.  The curve continues, 1000 bytes is
  6528. better than 100 and so on.  The curve flattens out between 32K and 64K bytes
  6529. (my tests were at sizes handy for me).  There was also an article in MacTech
  6530. magazine last year I believe that discusses block sizes and disk I/O.
  6531.  
  6532. Malcolm Teas
  6533. "Relax, it's only ones and zeros..."
  6534. Teas Technology - Custom software for the Mac and Newton.
  6535. Internet: "mhteas@aol.com" AppleLink or AOL: "mhteas"
  6536.  
  6537. >From Mhteas@aol.com 27 May 94 16:58:06 GMT
  6538. Path: ucivax!gateway
  6539. From: Mhteas@aol.com
  6540. Subject: Re: MPW Tools
  6541. Message-ID: <9405270958.aa18739@q2.ics.uci.edu>
  6542. X-Mailer: America Online Mailer
  6543. Newsgroups: fa.think-c
  6544. X-Message-ID: <9405252002.tn486737@aol.com>
  6545. Approved: usenet@q2.ics.uci.edu
  6546. Lines: 14
  6547. Date: 27 May 94 16:58:06 GMT
  6548.  
  6549. >The Symantec C++ box states that it supports MPW tools.
  6550.  
  6551. Does it support the ToolServer?  I believe that Symantec 6 was supposed to do
  6552. this.  At least their earlier publicity for 6 said this.  My guess is that
  6553. Symantec finally got TS in.
  6554.  
  6555. If it *is* TS, then you'd write the tool just like you'd write it for MPW.
  6556.  After all, TS is just MPW.
  6557.  
  6558. Malcolm Teas
  6559. "Relax, it's only ones and zeros..."
  6560. Teas Technology - Custom software for the Mac and Newton.
  6561. Internet: "mhteas@aol.com" AppleLink or AOL: "mhteas"
  6562.  
  6563. >From pindar3@cix.compulink.co.uk 27 May 94 17:05:25 GMT
  6564. Path: ucivax!gateway
  6565. From: pindar3@cix.compulink.co.uk (Pindar Infotek Ltd)
  6566. Subject: strncmp returns!
  6567. Message-ID: <9405271005.aa19415@q2.ics.uci.edu>
  6568. Newsgroups: fa.think-c
  6569. Reply-To: pindar3@cix.compulink.co.uk
  6570. X-Message-ID: <memo.227477@cix.compulink.co.uk>
  6571. Approved: usenet@q2.ics.uci.edu
  6572. Lines: 69
  6573. Date: 27 May 94 17:05:25 GMT
  6574.  
  6575.  
  6576. >From Pindar user Ian McCall
  6577.  
  6578. Subject: _strncmp returns!
  6579. A while back, I posted code saying I was having trouble with the
  6580. library function 'strncmp'. A couple of people posted back saying
  6581. they weren't having this problem, so I put it down to something I was
  6582. doing and worked around it.
  6583.  
  6584. However, I've now had call to use this routine again, and this time
  6585. there's a definite problem. Here is an excerpt from a piece of
  6586. conversion code I'm writing.
  6587.  
  6588.  
  6589. Boolean GetTagClassForIdentifier(char *theIdentifier)
  6590. /* This function return the type of tag indicated by the
  6591.    identifier string 'theIdentifier'.
  6592. */
  6593. {
  6594.    TagType   theType;
  6595.    int       test;
  6596.  
  6597.        /*   It's just a glorified if statement. We can't use case
  6598. since
  6599.        the data we're testing doesn't have a discrete value. Ho
  6600.        hum...
  6601.    */
  6602.    if((test = strncmp(theIdentifier, kPatentNumberString,
  6603.                                strlen(kPatentNumberString))) == 0)
  6604.    {
  6605.       theType = kPatentNumberTag;
  6606.    }
  6607.    else if(strcmp(theIdentifier, kGrantTitleString) == 0)
  6608.       theType = kGrantTitleTag;
  6609.    else if(strcmp(theIdentifier, kIntCl5String) == 0)
  6610.          etc.
  6611.    else
  6612.       theType = kUnknownTag;
  6613.  
  6614.    /*   Return the result   */
  6615.    return(theType);
  6616. }
  6617.  
  6618. The test data is
  6619.  
  6620.    theIdentifier       = "(54)Grant Title"
  6621.    kPatentNumberString = "(11)"
  6622.  
  6623.  
  6624. Now - under THINK, whatever I pass into this routine, strncmp says is
  6625. equal. ANYTHING. These means that everything I pass in gets
  6626. classified as being a kPatentNumberTag.
  6627.  
  6628. Compiling precisely the same code under MPW and using precisely the
  6629. same test data I get the correct result - the identifier is classed
  6630. as kGrantTitleTag.
  6631.  
  6632. Any clues?
  6633.  
  6634.  
  6635. Cheers,
  6636.       Ian
  6637.  
  6638.  
  6639.  
  6640. ---
  6641. Please make 'Attn:<space>Ian McCall' the first line of your reply
  6642. (not the subject) to ensure automatic forwarding to the correct
  6643. Pindar user.
  6644. >From waldorfm@admina.rferl.org 27 May 94 18:06:01 GMT
  6645. Path: ucivax!gateway
  6646. From: waldorfm@admina.rferl.org
  6647. Subject: Re: ICON
  6648. X-Sender: waldorfm@muvaxb.rferl.org
  6649. Message-ID: <9405271105.aa22613@q2.ics.uci.edu>
  6650. Content-transfer-encoding: 7BIT
  6651. Content-type: text/plain; charset="us-ascii"
  6652. MIME-version: 1.0
  6653. Newsgroups: fa.think-c
  6654. X-Message-ID: <01HCUH0ZQSLE90NYVU@AdminA.RFERL.Org>
  6655. Approved: usenet@q2.ics.uci.edu
  6656. Date-warning: Date header was inserted by AdminA.RFERL.Org
  6657. Lines: 48
  6658. Date: 27 May 94 18:06:01 GMT
  6659.  
  6660. >From:   IN%"SJKim@aol.com" 27-MAY-1994 10:27:22.38
  6661. >To:     IN%"think-c@ics.UCI.EDU"
  6662. >CC:
  6663. >Subj:   ICON
  6664. >
  6665. >
  6666. >Hello,
  6667. >I think this is a simple question for you guys.  Could anybody please tell me
  6668. >how to create a custom icon for my application?  After build my application,
  6669. >it always gives simple generic icon for the application.  I used ResEdit and
  6670. >create an icon and made BNDL resource that has 'APPL' and the icon I created.
  6671. > And then I assinged arbitrary signature in the signature field(4 characters
  6672. >long).  But still, I don't get the icon for my application.  Do I have to add
  6673. >some code into my source code to do this?
  6674. >
  6675. >Thanks...
  6676. >
  6677. >sjkim@aol.com
  6678.  
  6679. If you have previously given your application a custom Icon before (Get
  6680. Info cut&paste),
  6681. make sure you have NOT selected the same one in your BNDL resource (ID -
  6682. 16455).
  6683. And just in case, use Resedit (File Get file/folder info) etc. and check if
  6684. your application
  6685. still has the custom Icon flag - if so, turn it off.
  6686.  
  6687. Try rebuilding the desktop. I would copy the application to a floppy disk,
  6688. then re-insert the
  6689. disk with Command and Option key pressed down. However, sometimes this is
  6690. not completely
  6691. effective because the original desktop file was corrupted, so rebuilding it
  6692. only yields an
  6693. updated desktop file which is still damaged. There are free tools that can
  6694. help like
  6695. DestopReset or Techtool, but you can also use Resedit. Change the file
  6696. attribute of the
  6697. Desktop DF and Desktop DB file to visible, put the two files in the trash
  6698. and restart.
  6699.  
  6700.  
  6701. Best Regards,
  6702.  
  6703. Markus Waldorf
  6704. Information Technology Support Consultant
  6705. RFE/RL Inc, Munich, Germany
  6706.  
  6707.  
  6708. >From gurgle@netcom.com 27 May 94 19:25:12 GMT
  6709. Path: ucivax!gateway
  6710. From: gurgle@netcom.com (Pete Gontier)
  6711. Subject: Re: Chooser name - where is it?
  6712. Message-ID: <9405271225.aa26819@q2.ics.uci.edu>
  6713. In-Reply-To: <9405270150.aa18275@q2.ics.uci.edu> from "Lindsay Davies" at May 27, 94 08:50:35 am
  6714. X-Mailer: ELM [version 2.4 PL23]
  6715. Content-Transfer-Encoding: 7bit
  6716. Content-Type: text/plain; charset=US-ASCII
  6717. Content-Length: 1242
  6718. MIME-Version: 1.0
  6719. Newsgroups: fa.think-c
  6720. X-Message-ID: <199405271924.MAA11635@netcom.com>
  6721. Approved: usenet@q2.ics.uci.edu
  6722. Lines: 38
  6723. Date: 27 May 94 19:25:12 GMT
  6724.  
  6725. > This is something that has been niggling me for a while, and I have
  6726. > never found out the answer. How do I get the Chooser/Owner name that's
  6727. > set from the file sharing extension? I have scoured IM and Think Ref,
  6728. > but can't seem to hit on the answer.
  6729.  
  6730. Here is the code I use to get the Chooser name. The names and tabs have
  6731. been changed to protect the innocent and the narrow mailers. The 'STR '
  6732. resource lives in the System file -- this is why you don't see me
  6733. releasing it or changing its handle state to purgeable or some other
  6734. method of conserving the memory associated with it. I put no warrantees
  6735. on this code; use at your own risk.
  6736.  
  6737. pascal OSErr GetChooserName (Str31 chooserName)
  6738. {
  6739.         OSErr oe = noErr;
  6740.  
  6741.         StringHandle chooserNameH =
  6742.                 (StringHandle) GetResource ('STR ',-16096);
  6743.  
  6744.         if (!(oe = ResError ( )))
  6745.         if (!chooserNameH) oe = resNotFound;
  6746.         else
  6747.         {
  6748.                 unsigned char length = **chooserNameH;
  6749.  
  6750.                 if (length > 31) length = 31;
  6751.                 BlockMoveData ((*chooserNameH) + 1, chooserName + 1, length);
  6752.                 *chooserName = length;
  6753.         }
  6754.  
  6755.         return oe;
  6756. }
  6757.  
  6758. --
  6759.  Pete Gontier, CTO, Integer Poet Software; gurgle@netcom.com
  6760.  
  6761.  "Bedrock does support a form of drag and drop. Development dragged on
  6762.  for about two years, and then was dropped." -- Brian Clark
  6763. >From swenson@john.berkeley.edu 27 May 94 20:25:07 GMT
  6764. Path: ucivax!gateway
  6765. From: swenson@john.berkeley.edu (Kirk Swenson)
  6766. Subject: Apparent CodeGen bug in TC 7
  6767. Message-ID: <9405271325.aa29319@q2.ics.uci.edu>
  6768. Content-Type: text/plain; charset="us-ascii"
  6769. Mime-Version: 1.0
  6770. Newsgroups: fa.think-c
  6771. X-Message-ID: <9405272025.AA07699@john.Berkeley.EDU>
  6772. Approved: usenet@q2.ics.uci.edu
  6773. Lines: 63
  6774. Date: 27 May 94 20:25:07 GMT
  6775.  
  6776. While recompiling some code originally compiled with TC5 in TC7, I tracked
  6777. down an apparent problem with the optimizer's code generation.  It seems
  6778. that the Code Motion optimization doesn't handle volatile pointer variables
  6779. in the expected manner.  With code motion enabled, the reference to the
  6780. volatile variable is moved outside of the loop, and a local copy is checked
  6781. inside the loop.  The following code demonstrates this in its simplest
  6782. form.  Is this a bug or am I missing something?  If the former, is it a
  6783. known bug?
  6784.  
  6785. Note that the code that was optimized with code motion is less efficient in
  6786. time and space, in addition to being incorrect.  The compiler was upgraded
  6787. to version 7 using the online updater from the THINK C archives.  (For the
  6788. curious, the motivation for this code was to check the status of a global
  6789. flag that would be set by a VBL routine.)
  6790.  
  6791. main()
  6792. {
  6793.     /*
  6794.      * Declare ptr as a pointer to a volatile short.
  6795.      */
  6796.     volatile        short           *ptr;
  6797.  
  6798.     /*
  6799.      * Initialize volatile value to 0.
  6800.      * Loop until volatile value is set by VBL routine.
  6801.      */
  6802.     for( *ptr=0; *ptr == 0; );
  6803. }
  6804.  
  6805.  
  6806. #if 0
  6807.  
  6808. // With Code Motion
  6809. main:
  6810. 00000000: 4E56 FFFE    LINK      A6,#$FFFE
  6811. 00000004: 2F0C         MOVE.L    A4,-(A7)
  6812. 00000006: 4254         CLR.W     (A4)
  6813. 00000008: 3D54 FFFE    MOVE.W    (A4),$FFFE(A6) <-- Incorrectly moves volatile
  6814. 0000000C: 4A6E FFFE    TST.W     $FFFE(A6)          value to local variable
  6815. 00000010: 67FA         BEQ.S     *-$0004        ; 0000000C
  6816. 00000012: 285F         MOVEA.L   (A7)+,A4
  6817. 00000014: 4E5E         UNLK      A6
  6818. 00000016: 4E75         RTS
  6819. 00000018
  6820.  
  6821. // Without Code Motion
  6822. main:
  6823. 00000000: 2F0C         MOVE.L    A4,-(A7)
  6824. 00000002: 4254         CLR.W     (A4)
  6825. 00000004: 4A54         TST.W     (A4)           <-- Leaves volatile var alone
  6826. 00000006: 67FC         BEQ.S     *-$0002        ; 00000004
  6827. 00000008: 285F         MOVEA.L   (A7)+,A4
  6828. 0000000A: 4E75         RTS
  6829. 0000000C
  6830.  
  6831. #endif
  6832.  
  6833.  
  6834. Kirk Swenson
  6835. UCB School of Optometry
  6836. swenson@john.berkeley.edu
  6837.  
  6838.  
  6839. >From canna@bga.com 27 May 94 20:53:10 GMT
  6840. Path: ucivax!gateway
  6841. From: canna@bga.com (Lloyd Sargent)
  6842. Subject: What update did QuickdrawText.h come in?
  6843. X-Sender: canna@bga.com (Unverified)
  6844. Message-ID: <9405271353.aa01273@q2.ics.uci.edu>
  6845. Content-Type: text/plain; charset="us-ascii"
  6846. Mime-Version: 1.0
  6847. Newsgroups: fa.think-c
  6848. X-Message-ID: <199405272052.AA20231@zoom.bga.com>
  6849. Approved: usenet@q2.ics.uci.edu
  6850. Lines: 25
  6851. Date: 27 May 94 20:53:10 GMT
  6852.  
  6853. I just downloaded the 7.0.2 update and am attempting to precompile the
  6854. headers (as indicated in the instructions). But my attempt to do so bails
  6855. on the following:
  6856.  
  6857.         // QuickdrawText
  6858.         #if 1
  6859.                 #include <QuickdrawText.h>    <<<<====== NO CAN FIND!
  6860.         #endif
  6861.  
  6862. I have looked in the 6.0.1 update and in the 7.0 update (NOT to mention the
  6863. original 6.0 disks) and can NOT find this file! Am I just blind?
  6864.  
  6865. Sign me frustrated in Texas....
  6866.  
  6867.  
  6868. ----------------------------+-----------------------------------------
  6869. Lloyd Sargent               | "It's binary - it either works or it doesn't"
  6870. Head Honcho                 | Internet:  canna@bga.com
  6871. Canna Software Development  | AOL:       lgsargent@aol.com
  6872. 14308-B FM 812              | Phone:     (512) 243-0283, (512) 243-3355
  6873. Del Valle, Texas 78617      | Fax:       (512) 243-0283  (8-5 CST)
  6874.  
  6875.     "My company believes in First Admendment rights. So there!"
  6876.  
  6877.  
  6878. >From canna@bga.com 27 May 94 21:13:51 GMT
  6879. Path: ucivax!gateway
  6880. From: canna@bga.com (Lloyd Sargent)
  6881. Subject: Re: patch
  6882. Message-ID: <9405271413.aa02380@q2.ics.uci.edu>
  6883. Content-Type: text/plain; charset="us-ascii"
  6884. Mime-Version: 1.0
  6885. Newsgroups: fa.think-c
  6886. X-Message-ID: <199405272113.AA20988@zoom.bga.com>
  6887. Approved: usenet@q2.ics.uci.edu
  6888. Lines: 52
  6889. Date: 27 May 94 21:13:51 GMT
  6890.  
  6891. >On Fri, 27 May 1994 01:54:37 MDT Craig Hollabaugh wrote:
  6892. >
  6893. >    Saw the patch to 7.0.2 and grabbed it.
  6894. >
  6895. >    Got a "verify resource CNFG 0" error when going from 7.0.1
  6896. >
  6897. >    So I converted a 6.0.1 to 7.0.1 then to 7.0.2, got the same
  6898. >    error.
  6899. >
  6900. >    Unfortunately, I'm on the road without my 6.0 disks, so I can't
  6901. >    start with a "clean" version.
  6902. >
  6903. >    Does the patch work for you? (Stupid question since you posted it) Are
  6904. >    other people having the same problem?
  6905. >
  6906. >I applied all of the patch modules without error except for the
  6907. >Symantec C++ 7.0.2 patch.  It apparently requires a 7.0.1 version of
  6908. >the translator, even though the AppleLink message containing the
  6909. >update kit says it is for those who used the previously published
  6910. >update.
  6911. >
  6912. >I had not attempted the patch prior to uploading the archive, since
  6913. >I retrieved the kit directly from AppleLink and (mistakenly) assumed
  6914. >it had been tested first.  I'll upload an update as soon as it is
  6915. >made available.
  6916. >
  6917. >Mark
  6918. >
  6919. >--------
  6920. >Mark D. Nagel <mark.nagel@rdatasys.com>      Relational Data Systems
  6921. >                                             30 Executive Park, Suite 260
  6922. >Eat right.  Exercise.  Die anyway.           Irvine, CA 92714
  6923. >                                             (714) 263-3899
  6924.  
  6925.  
  6926. Well, I had to go back and get the bloody original off of 6.0, apply the
  6927. 6.0->7.0 patch and THEN the 7.0.2 patch (which worked like a charm).
  6928. Apparently this resource gets altered and the patch doesn't take that into
  6929. account (computer error ;)  I've lost three hours of time already on this
  6930. patch (does my frustration show?).... GRRRRRRR....
  6931.  
  6932.  
  6933. ----------------------------+-----------------------------------------
  6934. Lloyd Sargent               | "It's binary - it either works or it doesn't"
  6935. Head Honcho                 | Internet:  canna@bga.com
  6936. Canna Software Development  | AOL:       lgsargent@aol.com
  6937. 14308-B FM 812              | Phone:     (512) 243-0283, (512) 243-3355
  6938. Del Valle, Texas 78617      | Fax:       (512) 243-0283  (8-5 CST)
  6939.  
  6940.     "My company believes in First Admendment rights. So there!"
  6941.  
  6942.  
  6943. >From gurgle@netcom.com 27 May 94 23:40:31 GMT
  6944. Path: ucivax!gateway
  6945. From: gurgle@netcom.com (Pete Gontier)
  6946. Subject: SymC++ 7.0.2 updater requires homage to Rube Goldberg?
  6947. Message-ID: <9405271640.aa09433@q2.ics.uci.edu>
  6948. X-Mailer: ELM [version 2.4 PL23]
  6949. Content-Transfer-Encoding: 7bit
  6950. Content-Type: text/plain; charset=US-ASCII
  6951. Content-Length: 901
  6952. MIME-Version: 1.0
  6953. Newsgroups: fa.think-c
  6954. X-Message-ID: <199405272340.QAA16849@netcom.com>
  6955. Approved: usenet@q2.ics.uci.edu
  6956. Lines: 23
  6957. Date: 27 May 94 23:40:31 GMT
  6958.  
  6959. In order to apply the SymC++ 7.0.2 patches, it looks like I am going to
  6960. have to:
  6961.  
  6962.         1) install 6.0 from floppy
  6963.         2) download the 6.0.1 updater package
  6964.         3) apply the 6.0.1 updater package
  6965.         4) download the 7.0 updater package
  6966.         5) apply the 7.0 updater package
  6967.         6) apply the 7.0.2 updater package
  6968.  
  6969. I believe this to be the case because the updater READ ME file suggests
  6970. the updater will not work on anything but a virgin installation of
  6971. 7.0 (or, presumably, 7.0.1, which of course I do not possess). I have
  6972. verified this empirically (read: tried updating used files anyway). Past
  6973. experience indicates that I am not going to be able to coax the updater
  6974. programs to do their stuff against files which have been used.
  6975.  
  6976. Does anybody have any suggestions on how to avoid the above sequence?
  6977.  
  6978. --
  6979.  Pete Gontier, CTO, Integer Poet Software; gurgle@netcom.com
  6980.  
  6981.  "...where they burn books, people are next." -- XTC
  6982. >From mauricio@mozart.aero.ufl.edu 28 May 94 02:31:55 GMT
  6983. Path: ucivax!gateway
  6984. From: mauricio@mozart.aero.ufl.edu (Mauricio Tavares)
  6985. Subject: Re: Reading data from a file
  6986. Message-ID: <9405271931.aa15794@q2.ics.uci.edu>
  6987. X-Mailer: ELM [version 2.3 PL2]
  6988. Newsgroups: fa.think-c
  6989. X-Message-ID: <9405280231.AA13436@mozart.aero.ufl.edu>
  6990. Approved: usenet@q2.ics.uci.edu
  6991. Lines: 56
  6992. Date: 28 May 94 02:31:55 GMT
  6993.  
  6994. > If you figured out how to use iErr = FSRead(fRefNum,&inOutCount,bufPtr);,
  6995. > you can use the stdio.h function numargs = sscanf(string,format,); to
  6996. > parse your bufPtr string, instead of fscanf.
  6997. >
  6998. > Hope this helps,
  6999.  
  7000.         I think it should, now that I have time to do some programming.
  7001. Based on that, I though on doing the following:
  7002.  
  7003. 1. Find the size of the data fork of the file
  7004.  
  7005. I thought on reading the entire file into memory since it is more
  7006. convenient for me and I do not expect it to be more than 20K long. Now, how to
  7007. find the size of the file?  I thought on using something like GetEOF(), but
  7008. will it return the size of the data fork only?
  7009.  
  7010. 2. Allocate memory
  7011. char *fileBuffPtr  = (char*)calloc(fileSize,sizeof(char));
  7012.  
  7013. 3. Read in the entire file into the pointer
  7014. iErr = FSRead(fRefNum,fileSize,fileBuffPtr);
  7015.  
  7016. 4. Read the data out of the buffer
  7017.  
  7018. After some thought, I decided to have my file with the following format:
  7019.  
  7020. VARNAME: N
  7021.  
  7022. where VARNAME: is the name of the variable and N is its value.  For
  7023. instance, I might have something like:
  7024.  
  7025. NAME: Moose
  7026. DT: 2500
  7027. DNU:  .0537
  7028. MU: 123e-4
  7029. R1: 1e4  .234e4  -1.344e4
  7030.  
  7031. This way, I can simply look first for the VARNAME: string and then I read
  7032. in the data associated with VARNAME:.  If one of these variables is not
  7033. available, I can always return an error code... or even use the default
  7034. data if I think the user will be too scared if he sees my dialog. B)
  7035.  
  7036. I know that is not as easy as I am making it to be -- it should in fact be
  7037. quite complicated since it needs to search around for my magic string and
  7038. ignore any leading space -- but I think it worth the effort.  For the time
  7039. being, I will instead use sscanf() instead of fscanf(), with small modifcations to allow for testing whether the data was read or not:
  7040.  
  7041. if(!sscanf(fileBuffPtr, "%lf\n", &(data->dt));
  7042. {
  7043.         Complain("dt");
  7044. }
  7045. [...]
  7046.  
  7047. BTW, Have you ever done something like what I want to do in the end
  7048. (VARNAME: and such)?
  7049.  
  7050. >From waldorfm@admina.rferl.org 28 May 94 12:26:58 GMT
  7051. Path: ucivax!gateway
  7052. From: waldorfm@admina.rferl.org (Markus Waldorf)
  7053. Subject: HLock/HUnlock ?
  7054. X-Sender: waldorfm@muvaxb.rferl.org
  7055. Message-ID: <9405280526.aa14524@q2.ics.uci.edu>
  7056. Content-transfer-encoding: 7BIT
  7057. Content-type: text/plain; charset="us-ascii"
  7058. MIME-version: 1.0
  7059. Newsgroups: fa.think-c
  7060. X-Message-ID: <01HCVJHK5ZNM90OUSG@AdminA.RFERL.Org>
  7061. Approved: usenet@q2.ics.uci.edu
  7062. Date-warning: Date header was inserted by AdminA.RFERL.Org
  7063. Lines: 27
  7064. Date: 28 May 94 12:26:58 GMT
  7065.  
  7066. Hi,
  7067.  
  7068.  
  7069. Remember, handles are pointers to pointers. If you ever want to singly
  7070. dereference a handle, make sure you lock it first!
  7071.  
  7072.                            "Macintosh C Programming Primer, Vol. 1"
  7073.  
  7074.  
  7075. For instance: HLock( (Handle)iconHandle );
  7076.               HUnlock( (Handle)iconHandle );
  7077.  
  7078.  
  7079. English is not my native language, perhaps that's why I don't know
  7080. what "singly dereference" means. Could someone please give me a further
  7081. explanation? Many Thanks!
  7082.  
  7083.  
  7084. --------------------------------------------------------------------------
  7085. _/ _/   _/_/_/ _/_/_/   Markus Waldorf                      _/ _/   _/
  7086. _/  _/  _/     _/       Information Technology Consultant   _/  _/  _/
  7087. _/_/    _/_/   _/_/     RFE/RL Inc, Munich, Germany         _/_/    _/
  7088. _/  _/  _/     _/       Compu$erve: 100022,2373             _/  _/  _/
  7089. _/  _/  _/     _/_/_/   Internet: waldorfm@rferl.org        _/  _/  _/_/_/
  7090. --------------------------------------------------------------------------
  7091.  
  7092.  
  7093. >From canna@bga.com 28 May 94 15:13:13 GMT
  7094. Path: ucivax!gateway
  7095. From: canna@bga.com (Lloyd Sargent)
  7096. Subject: Probs with 7.0 code generation...
  7097. Message-ID: <9405280813.aa17302@q2.ics.uci.edu>
  7098. Content-Type: text/plain; charset="us-ascii"
  7099. Mime-Version: 1.0
  7100. Newsgroups: fa.think-c
  7101. X-Message-ID: <199405281512.AA11360@zoom.bga.com>
  7102. Approved: usenet@q2.ics.uci.edu
  7103. Lines: 28
  7104. Date: 28 May 94 15:13:13 GMT
  7105.  
  7106. I have been trying to get this thing to spit out the right code for the
  7107. last 4 days. I have consistantly fail.  The code is simple and looks like
  7108. the following:
  7109.  
  7110. Session->paramblock.startParam.ioCompletion = (ProcPtr) OpenSessionCallback;
  7111.  
  7112. Fortunately, MOST of the code seems to be correct. It comes out as:
  7113.  
  7114.         LEA OpenSessionCallBack,A0
  7115.  
  7116. What is weird is that it generates the correct offset (EA), but tries to
  7117. address it off of A5 instead of the PC. Has anyone else had this prob and
  7118. do they have a solution? This is really annoying.
  7119.  
  7120. Thanks!
  7121.  
  7122.  
  7123.  
  7124. ----------------------------+-----------------------------------------
  7125. Lloyd Sargent               | "It's binary - it either works or it doesn't"
  7126. Head Honcho                 | Internet:  canna@bga.com
  7127. Canna Software Development  | AOL:       lgsargent@aol.com
  7128. 14308-B FM 812              | Phone:     (512) 243-0283, (512) 243-3355
  7129. Del Valle, Texas 78617      | Fax:       (512) 243-0283  (8-5 CST)
  7130.  
  7131.     "My company believes in First Admendment rights. So there!"
  7132.  
  7133.  
  7134. >From sm3@evansville.edu 28 May 94 15:52:25 GMT
  7135. Path: ucivax!gateway
  7136. From: sm3@evansville.edu (Steve Madancy)
  7137. Subject: Re: SymC++ 7.0.2 updater requires homage to Rube Goldberg?
  7138. Message-ID: <9405280852.aa18145@q2.ics.uci.edu>
  7139. In-Reply-To: <9405271640.aa09433@q2.ics.uci.edu>
  7140. Content-Type: TEXT/PLAIN; charset=US-ASCII
  7141. MIME-Version: 1.0
  7142. Newsgroups: fa.think-c
  7143. X-Message-ID: <Pine.3.89.9405281027.A10223-0100000@uenics.evansville.edu>
  7144. Approved: usenet@q2.ics.uci.edu
  7145. Lines: 27
  7146. Date: 28 May 94 15:52:25 GMT
  7147.  
  7148. On 27 May 1994, Pete Gontier wrote:
  7149.  
  7150. > In order to apply the SymC++ 7.0.2 patches, it looks like I am going to
  7151. > have to:
  7152. >
  7153. >       1) install 6.0 from floppy
  7154. >       2) download the 6.0.1 updater package
  7155. >       3) apply the 6.0.1 updater package
  7156. >       4) download the 7.0 updater package
  7157. >       5) apply the 7.0 updater package
  7158. >       6) apply the 7.0.2 updater package
  7159. >
  7160. > I believe this to be the case because the updater READ ME file suggests
  7161. > the updater will not work on anything but a virgin installation of
  7162. > 7.0 (or, presumably, 7.0.1, which of course I do not possess). I have
  7163. > verified this empirically (read: tried updating used files anyway). Past
  7164. > experience indicates that I am not going to be able to coax the updater
  7165. > programs to do their stuff against files which have been used.
  7166. >
  7167. MY question is, IS it possible to run the upgrader on a virgin 7.0.1
  7168. installation? How about some help from Symantec on this one?
  7169.  
  7170.  
  7171. ----------------------------
  7172. Steve Madancy
  7173. sm3@evansville.edu
  7174.  
  7175. >From walrathw@rferl.org 28 May 94 16:47:40 GMT
  7176. Path: ucivax!gateway
  7177. From: walrathw@rferl.org (WalrathW)
  7178. Subject: RE: What update did QuickdrawText.h come in?
  7179. Message-ID: <9405280947.aa19460@q2.ics.uci.edu>
  7180. Content-transfer-encoding: 7BIT
  7181. Content-type: TEXT/PLAIN; CHARSET=US-ASCII
  7182. Newsgroups: fa.think-c
  7183. X-Message-ID: <01HCVSLWKS0I8WWRJ8@MUVAXA.RFERL.ORG>
  7184. Approved: usenet@q2.ics.uci.edu
  7185. Lines: 27
  7186. Date: 28 May 94 16:47:40 GMT
  7187.  
  7188.  
  7189. >
  7190. _______________________________________________________________________________
  7191. > From: Lloyd Sargent on Sat, May 28, 1994 5:15
  7192. > Subject: What update did QuickdrawText.h come in?
  7193. > To: think-c@ics.UCI.EDU
  7194. >
  7195. > I just downloaded the 7.0.2 update and am attempting to precompile the
  7196. > headers (as indicated in the instructions). But my attempt to do so
  7197. > bails
  7198. > on the following:
  7199. >
  7200. >         // QuickdrawText
  7201. >         #if 1
  7202. >                 #include <QuickdrawText.h>    <<<<====== NO CAN FIND!
  7203. >         #endif
  7204. >
  7205. > I have looked in the 6.0.1 update and in the 7.0 update (NOT to
  7206. > mention the
  7207. > original 6.0 disks) and can NOT find this file! Am I just blind?
  7208. >
  7209. > Sign me frustrated in Texas....
  7210.  
  7211. Perhaps the best advice is never to apply a Symantec patch when you have
  7212. deadlines to meet! I've been afraid of even trying to update my version.
  7213.  
  7214. Could it be a Universal header?
  7215. >From berthoms@frbdx11.cribx1.u-bordeaux.fr 28 May 94 17:04:04 GMT
  7216. Path: ucivax!gateway
  7217. From: berthoms@frbdx11.cribx1.u-bordeaux.fr (Jean Berthomieu)
  7218. Subject: EDS-7.0.2 - CNFG problem, the clue(?)
  7219. Message-ID: <9405281004.aa19856@q2.ics.uci.edu>
  7220. Content-Type: text
  7221. Content-Length: 743
  7222. Newsgroups: fa.think-c
  7223. X-Message-ID: <9405281804.AA17627@frbdx11.cribx1.u-bordeaux.fr>
  7224. Approved: usenet@q2.ics.uci.edu
  7225. Lines: 20
  7226. Date: 28 May 94 17:04:04 GMT
  7227.  
  7228.  
  7229. I too had to reinstall the C++ translator from the original disks to
  7230. allow the Symantec C++ 7.0.2 patch to be applied. That is: install 6.0,
  7231. update to 7.0, then update to 7.0.2 :-(
  7232.  
  7233. Then I used ResCompare between the 7.0 version I had previously used and
  7234. a copy of the new one on which the patch program did work.
  7235.  
  7236. Now, that's the clue: The CNFG resources both had a name, and they should
  7237. not (to be patched).
  7238.  
  7239. So instead of reinstalling the whole stuff, you may use Resedit and clear
  7240. the resources names for CNFG 0 and 1 (in the Get Info dialog).
  7241. Then you can apply the patch!
  7242.  
  7243. Use a copy of the C++ translator to do this, and since you may not change
  7244. its name, do it in an other place than the Translators folder, e.g. on the
  7245. desktop ;-)
  7246.  
  7247.  
  7248. >From gurgle@netcom.com 28 May 94 17:44:38 GMT
  7249. Path: ucivax!gateway
  7250. From: gurgle@netcom.com (Pete Gontier)
  7251. Subject: Re: SymC++ 7.0.2 updater requires homage to Rube Goldberg?
  7252. Message-ID: <9405281044.aa20783@q2.ics.uci.edu>
  7253. In-Reply-To: <9405271640.aa09433@q2.ics.uci.edu> from "Pete Gontier" at May 27, 94 11:40:31 pm
  7254. X-Mailer: ELM [version 2.4 PL23]
  7255. Content-Transfer-Encoding: 7bit
  7256. Content-Type: text/plain; charset=US-ASCII
  7257. Content-Length: 1483
  7258. MIME-Version: 1.0
  7259. Newsgroups: fa.think-c
  7260. X-Message-ID: <199405281744.KAA00600@netcom.com>
  7261. Approved: usenet@q2.ics.uci.edu
  7262. Lines: 35
  7263. Date: 28 May 94 17:44:38 GMT
  7264.  
  7265. > In order to apply the SymC++ 7.0.2 patches, it looks like I am going to
  7266. > have to:
  7267. >
  7268. >       1) install 6.0 from floppy
  7269. >       2) download the 6.0.1 updater package
  7270. >       3) apply the 6.0.1 updater package
  7271. >       4) download the 7.0 updater package
  7272. >       5) apply the 7.0 updater package
  7273. >       6) apply the 7.0.2 updater package
  7274.  
  7275. Well, it turns out that the first patch I was trying to apply was the
  7276. C++ translator patch. The TPM patch and the Debugger patch work fine.
  7277.  
  7278. The C++ translator patcher apparently balks because a CNFG resource in
  7279. the 7.0 translator has a name and it expects that resource to not have
  7280. a name. So, based on a hint from Usenet, I nuked the name and the
  7281. patcher app worked.
  7282.  
  7283. The THINK C translator patcher I still can't apply because even though
  7284. the patcher fails with a similar complaint, the resources in question
  7285. don't have names, so there are no names to delete. Maybe I should *add*
  7286. names. Hmmmm.
  7287.  
  7288. All of this hassle (both for us and for Symantec, who has to listen to
  7289. us whine) leads me to wonder: since the translators are useless without
  7290. TPM, why not just distribute whole translator files? Are they that
  7291. large? <checking> Hmmm. Well, sort of. 440K for the C++ translator. I'd
  7292. be happier waiting a little longer for that download than going through
  7293. the 1 thru 6 sequence above. Undoubtedly there are people who would
  7294. complain about it.
  7295.  
  7296. --
  7297.  Pete Gontier, CTO, Integer Poet Software; gurgle@netcom.com
  7298.  
  7299.  You thought Obfuscated C was confusing? Wait for Obfuscated C++!
  7300. >From gurgle@netcom.com 28 May 94 18:03:23 GMT
  7301. Path: ucivax!gateway
  7302. From: gurgle@netcom.com (Pete Gontier)
  7303. Subject: Re: HLock/HUnlock ?
  7304. Message-ID: <9405281103.aa21313@q2.ics.uci.edu>
  7305. In-Reply-To: <9405280526.aa14524@q2.ics.uci.edu> from "Markus Waldorf" at May 28, 94 12:26:58 pm
  7306. X-Mailer: ELM [version 2.4 PL23]
  7307. Content-Transfer-Encoding: 7bit
  7308. Content-Type: text/plain; charset=US-ASCII
  7309. Content-Length: 3020
  7310. MIME-Version: 1.0
  7311. Newsgroups: fa.think-c
  7312. X-Message-ID: <199405281803.LAA02567@netcom.com>
  7313. Approved: usenet@q2.ics.uci.edu
  7314. Lines: 61
  7315. Date: 28 May 94 18:03:23 GMT
  7316.  
  7317. > "Macintosh C Programming Primer, Vol. 1" writes:
  7318. >
  7319. >> Remember, handles are pointers to pointers. If you ever want to singly
  7320. >> dereference a handle, make sure you lock it first!
  7321. >
  7322. > English is not my native language, perhaps that's why I don't know
  7323. > what "singly dereference" means. Could someone please give me a further
  7324. > explanation? Many Thanks!
  7325.  
  7326. Firstly, if that's all the book says, it's wrong. More on that later.
  7327. For now, here is an example of "half dereferencing" a handle. (I don't
  7328. know where the book got "singly dereference" -- it's not jargon I've
  7329. seen before, though I can parse it.)
  7330.  
  7331.         Handle  h                       = NewHandle (1);
  7332.         Ptr     halfDereferenced        = *h;
  7333.         char    fullyDereferenced       = **h;
  7334.  
  7335. Since the Memory Manager sometimes moves the memory block around to
  7336. reduce fragmentation, the 'Ptr' can become stale. Describing the
  7337. "sometimes" is what your book appears to neglect explaining.
  7338.  
  7339. See, lots of system calls rely on the Memory Manager. Lots of system
  7340. calls rely on other system calls which rely on the Memory Manager. What
  7341. happens is that a routine that looks totally innocent might cause memory
  7342. to move just because it relies on some other innocent-looking routine
  7343. which relies on still other routines which ultimately rely on the Memory
  7344. Manager. My policy, rather than memorizing or looking up which calls
  7345. move memory, is to assume any system call moves memory. (There isn't
  7346. a list of calls which do/n't move memory that Apple hasn't disowned
  7347. anyway.)
  7348.  
  7349. This is an especially useful assumption when you consider there are lots
  7350. of badly written system extensions out there which cause memory to move
  7351. during system calls which are not supposed to move memory. And there's
  7352. always the possibility that Apple will change a system call to move
  7353. memory; 'SysBeep', for example, used to be safe, but then it was changed
  7354. to support digitized sound resources and suddenly it needed to move
  7355. memory.
  7356.  
  7357. Another thing to watch out for is subroutine calls across code segments.
  7358. The Segment Loader can move memory while it loads in a code resource
  7359. which is not yet present in memory. (Loading and locking all your 'CODE'
  7360. resources at startup can prevent this.)
  7361.  
  7362. However, in the code sample above, there is no risk, and that's why I
  7363. think the explanation in your book is suspect. See, a C compiler is
  7364. never going to generate a function which itself moves memory. It doesn't
  7365. know how; it's beyond the scope of the language. So you can do whatever
  7366. you want with a half-dereferenced handle as long as you don't make a
  7367. function call -- and sometimes you can even make a function call if you
  7368. can guarantee the called function lives in the same segment -- but that
  7369. gets to be a maintenance headache.
  7370.  
  7371. --
  7372.  Pete Gontier, CTO, Integer Poet Software; gurgle@netcom.com
  7373.  
  7374.  "...someone not acquainted with the Christian mythology of the
  7375.  Crucifixion might consider a Crucifix to be a particularly sadistic
  7376.  piece of erotica... We of the ACLU will continue to defend your right to
  7377.  worship such objects if it pleases you." -- Gregory J. Wageman
  7378. >From msandri@netcom.com 28 May 94 22:32:30 GMT
  7379. Path: ucivax!gateway
  7380. From: msandri@netcom.com (Marco Sandri)
  7381. Subject: Re: SymC++ 7.0.2 updater requires...
  7382. Message-ID: <9405281532.aa26880@q2.ics.uci.edu>
  7383. X-Mailer: ELM [version 2.4 PL23]
  7384. Content-Transfer-Encoding: 7bit
  7385. Content-Type: text/plain; charset=US-ASCII
  7386. Content-Length: 1263
  7387. MIME-Version: 1.0
  7388. Newsgroups: fa.think-c
  7389. Reply-To: Marco Sandri <msandri@netcom.com>
  7390. X-Message-ID: <199405282232.PAA07223@netcom.netcom.com>
  7391. Approved: usenet@q2.ics.uci.edu
  7392. Lines: 34
  7393. Date: 28 May 94 22:32:30 GMT
  7394.  
  7395. Hi Pete,
  7396.  
  7397. > In order to apply the SymC++ 7.0.2 patches, it looks like I am going to
  7398. > have to:
  7399. >
  7400. >       1) install 6.0 from floppy
  7401. >       2) download the 6.0.1 updater package
  7402. >       3) apply the 6.0.1 updater package
  7403. >       4) download the 7.0 updater package
  7404. >       5) apply the 7.0 updater package
  7405. >       6) apply the 7.0.2 updater package
  7406. >
  7407. > I believe this to be the case because the updater READ ME file suggests
  7408. > the updater will not work on anything but a virgin installation of
  7409. > 7.0 (or, presumably, 7.0.1, which of course I do not possess). I have
  7410. > verified this empirically (read: tried updating used files anyway). Past
  7411. > experience indicates that I am not going to be able to coax the updater
  7412. > programs to do their stuff against files which have been used.
  7413. >
  7414. > Does anybody have any suggestions on how to avoid the above sequence?
  7415.  
  7416. I simply stored a perfectly clean installation (never used) on a cartridge;
  7417. every time I get a patch, I apply this patch to a copy of this installation
  7418. and, if all completes successfully, I replace the previous copy with
  7419. the newer one.
  7420.  
  7421. Bye,
  7422. Marco
  7423.  
  7424. ============================================================
  7425.   Marco Sandri
  7426.   msandri@netcom.com
  7427.   sandri@cadlab.systemy.org
  7428. ============================================================
  7429. >From canna@bga.com 29 May 94 01:47:28 GMT
  7430. Path: ucivax!gateway
  7431. From: canna@bga.com (Lloyd Sargent)
  7432. Subject: RE: What update did QuickdrawText.h come in?
  7433. Message-ID: <9405281847.aa00686@q2.ics.uci.edu>
  7434. Content-Type: text/plain; charset="us-ascii"
  7435. Mime-Version: 1.0
  7436. Newsgroups: fa.think-c
  7437. X-Message-ID: <199405290147.AA23178@zoom.bga.com>
  7438. Approved: usenet@q2.ics.uci.edu
  7439. Lines: 52
  7440. Date: 29 May 94 01:47:28 GMT
  7441.  
  7442. >>
  7443. >_______________________________________________________________________________
  7444. >> From: Lloyd Sargent on Sat, May 28, 1994 5:15
  7445. >> Subject: What update did QuickdrawText.h come in?
  7446. >> To: think-c@ics.UCI.EDU
  7447. >>
  7448. >> I just downloaded the 7.0.2 update and am attempting to precompile the
  7449. >> headers (as indicated in the instructions). But my attempt to do so
  7450. >> bails
  7451. >> on the following:
  7452. >>
  7453. >>         // QuickdrawText
  7454. >>         #if 1
  7455. >>                 #include <QuickdrawText.h>    <<<<====== NO CAN FIND!
  7456. >>         #endif
  7457. >>
  7458. >> I have looked in the 6.0.1 update and in the 7.0 update (NOT to
  7459. >> mention the
  7460. >> original 6.0 disks) and can NOT find this file! Am I just blind?
  7461. >>
  7462. >> Sign me frustrated in Texas....
  7463. >
  7464. >Perhaps the best advice is never to apply a Symantec patch when you have
  7465. >deadlines to meet! I've been afraid of even trying to update my version.
  7466. >
  7467. >Could it be a Universal header?
  7468.                ^^^^^^^^^^^^^^^^
  7469.  
  7470. Heh, heh, apparently it doesn't exist in MY limited universe!
  7471.  
  7472. These are the three include files that I had to #if out  in order to
  7473. precompile everything...
  7474.  
  7475.                 #include <QuickdrawText.h>
  7476.                 #include <TextServices.h>
  7477.                 #include <TextUtils.h>
  7478.  
  7479. Now, my question is, did Symantec FAIL to include these in the update? If
  7480. so, then how do I get them?
  7481.  
  7482.  
  7483.  
  7484. ----------------------------+-----------------------------------------
  7485. Lloyd Sargent               | "It's binary - it either works or it doesn't"
  7486. Head Honcho                 | Internet:  canna@bga.com
  7487. Canna Software Development  | AOL:       lgsargent@aol.com
  7488. 14308-B FM 812              | Phone:     (512) 243-0283, (512) 243-3355
  7489. Del Valle, Texas 78617      | Fax:       (512) 243-0283  (8-5 CST)
  7490.  
  7491.     "My company believes in First Admendment rights. So there!"
  7492.  
  7493.  
  7494. >From whusain@k12.az.us 29 May 94 18:20:52 GMT
  7495. Path: ucivax!gateway
  7496. From: whusain@k12.az.us (Will Glass-Husain)
  7497. Subject: how to turn on program linking without chooser
  7498. Message-ID: <9405291120.aa04067@q2.ics.uci.edu>
  7499. Content-Type: TEXT/PLAIN; charset=US-ASCII
  7500. content-length: 146
  7501. Mime-Version: 1.0
  7502. Newsgroups: fa.think-c
  7503. X-Message-ID: <Pine.3.89.9405291122.A18015-0100000@azedlink1.ade.state.az.us>
  7504. Approved: usenet@q2.ics.uci.edu
  7505. Lines: 5
  7506. Date: 29 May 94 18:20:52 GMT
  7507.  
  7508.  
  7509. Does anyone know how to turn on program linking in sys 7 without using
  7510. the chooser?  I can't seem to find anything in Think Reference.
  7511.  
  7512. -->Will
  7513. >From KevinH1024@aol.com 29 May 94 21:32:22 GMT
  7514. Path: ucivax!gateway
  7515. From: KevinH1024@aol.com
  7516. Subject: Mailing list
  7517. Message-ID: <9405291432.aa08322@q2.ics.uci.edu>
  7518. X-Mailer: America Online Mailer
  7519. Newsgroups: fa.think-c
  7520. X-Message-ID: <9405291732.tn602792@aol.com>
  7521. Approved: usenet@q2.ics.uci.edu
  7522. Lines: 2
  7523. Date: 29 May 94 21:32:22 GMT
  7524.  
  7525. Please remove from mailing list.
  7526.  
  7527. >From msandri@netcom.com 29 May 94 22:52:36 GMT
  7528. Path: ucivax!gateway
  7529. From: msandri@netcom.com (Marco Sandri)
  7530. Subject: RE: What update did QuickdrawText.h
  7531. Message-ID: <9405291552.aa09985@q2.ics.uci.edu>
  7532. X-Mailer: ELM [version 2.4 PL23]
  7533. Content-Transfer-Encoding: 7bit
  7534. Content-Type: text/plain; charset=US-ASCII
  7535. Content-Length: 1823
  7536. MIME-Version: 1.0
  7537. Newsgroups: fa.think-c
  7538. Reply-To: Marco Sandri <msandri@netcom.com>
  7539. X-Message-ID: <199405292252.PAA21610@netcom.netcom.com>
  7540. Approved: usenet@q2.ics.uci.edu
  7541. Lines: 55
  7542. Date: 29 May 94 22:52:36 GMT
  7543.  
  7544. Hi,
  7545.  
  7546. >>_______________________________________________________________________________
  7547. >>> From: Lloyd Sargent on Sat, May 28, 1994 5:15
  7548. >>> Subject: What update did QuickdrawText.h come in?
  7549. >>> To: think-c@ics.UCI.EDU
  7550. >>>
  7551. >>> I just downloaded the 7.0.2 update and am attempting to precompile the
  7552. >>> headers (as indicated in the instructions). But my attempt to do so
  7553. >>> bails
  7554. >>> on the following:
  7555. >>>
  7556. >>>         // QuickdrawText
  7557. >>>         #if 1
  7558. >>>                 #include <QuickdrawText.h>    <<<<====== NO CAN FIND!
  7559. >>>         #endif
  7560. >>>
  7561. >>> I have looked in the 6.0.1 update and in the 7.0 update (NOT to
  7562. >>> mention the
  7563. >>> original 6.0 disks) and can NOT find this file! Am I just blind?
  7564. >>>
  7565. >>> Sign me frustrated in Texas....
  7566. >>
  7567. >>Perhaps the best advice is never to apply a Symantec patch when you have
  7568. >>deadlines to meet! I've been afraid of even trying to update my version.
  7569. >>
  7570. >>Could it be a Universal header?
  7571. >               ^^^^^^^^^^^^^^^^
  7572. >
  7573. >Heh, heh, apparently it doesn't exist in MY limited universe!
  7574. >
  7575. >These are the three include files that I had to #if out  in order to
  7576. >precompile everything...
  7577. >
  7578. >                #include <QuickdrawText.h>
  7579. >                #include <TextServices.h>
  7580. >                #include <TextUtils.h>
  7581. >
  7582. >Now, my question is, did Symantec FAIL to include these in the update? If
  7583. >so, then how do I get them?
  7584.  
  7585. I think Symantec includes them only in 7.0 original package, along with
  7586. PPC translator...
  7587. I found them on the Develop CD issue 16. There was a pre-release of
  7588. Universal Headers; probabily the issue 17 contains a release.. I don't know,
  7589. I haven't seen it yet.
  7590.  
  7591. Bye,
  7592. Marco
  7593.  
  7594. ============================================================
  7595.   Marco Sandri
  7596.   msandri@netcom.com
  7597.   sandri@cadlab.systemy.org
  7598. ============================================================
  7599. >From SJKim@aol.com 30 May 94 03:51:31 GMT
  7600. Path: ucivax!gateway
  7601. From: SJKim@aol.com
  7602. Subject: *** Custom ICON summary ***
  7603. Message-ID: <9405292051.aa17012@q2.ics.uci.edu>
  7604. X-Mailer: America Online Mailer
  7605. Newsgroups: fa.think-c
  7606. X-Message-ID: <9405292351.tn610235@aol.com>
  7607. Approved: usenet@q2.ics.uci.edu
  7608. Lines: 148
  7609. Date: 30 May 94 03:51:31 GMT
  7610.  
  7611. Dear netters:
  7612.  
  7613. I really appreciate everyone who helped me...
  7614. This is what I asked:
  7615.  
  7616. Q: -----------------------------------
  7617. Could anybody please tell me
  7618. how to create a custom icon for my application?  After build my application,
  7619. it always gives simple generic icon for the application.  I used ResEdit and
  7620. create an icon and made BNDL resource that has 'APPL' and the icon I created.
  7621.  And then I assinged arbitrary signature in the signature field(4 characters
  7622. long).  But still, I don't get the icon for my application.  Do I have to add
  7623. some code into my source code to do this?
  7624.  
  7625. A:------------------------------------
  7626. 1]==========================================
  7627. If you have previously given your application a custom Icon before (Get
  7628. Info cut&paste),
  7629. make sure you have NOT selected the same one in your BNDL resource (ID -
  7630. 16455).
  7631. And just in case, use Resedit (File Get file/folder info) etc. and check if
  7632. your application
  7633. still has the custom Icon flag - if so, turn it off.
  7634.  
  7635. Try rebuilding the desktop. I would copy the application to a floppy disk,
  7636. then re-insert the
  7637. disk with Command and Option key pressed down. However, sometimes this is
  7638. not completely
  7639. effective because the original desktop file was corrupted, so rebuilding it
  7640. only yields an
  7641. updated desktop file which is still damaged. There are free tools that can
  7642. help like
  7643. DestopReset or Techtool, but you can also use Resedit. Change the file
  7644. attribute of the
  7645. Desktop DF and Desktop DB file to visible, put the two files in the trash
  7646. and restart.
  7647.  
  7648.  
  7649. Best Regards,
  7650.  
  7651. Markus Waldorf
  7652. Information Technology Support Consultant
  7653. RFE/RL Inc, Munich, Germany
  7654.  
  7655. 2]==============================================
  7656. Rebuild the desktop or set the init finder flag to false and restart. The
  7657. BNDL needs to be added to the Desktop database.
  7658.  
  7659. Lance
  7660.  
  7661. 3]==============================================
  7662. Hey,
  7663.  
  7664. Assuming system 7, this is quite easy. After drawing your icon in whatever
  7665. drawing program you like, simply copy your icon to
  7666. the clipboard, do a "get info" [command - I] on your app,
  7667.  and paste it onto your app's icon in the "get info" box of your app.
  7668.  
  7669. You can also get icons from other files/folders by copying them from
  7670. their respective 'get info' boxes.  Have fun.
  7671.  
  7672.         -Lar
  7673. 4]==============================================
  7674. Try rebuilding your desktop (hold down cmd-option keys while rebooting your
  7675. mac). If that doesn't work than you must have screwed up somthing with the
  7676. resources. Make sure you also have an FREF resource (I think it gets created
  7677. when you make the BNDL, though). Go into another application's resources and
  7678. compare against theirs, making certain that yours looks more or less the
  7679. same.
  7680.  
  7681. cheers,
  7682.   -wayne
  7683.  
  7684. 5]==============================================
  7685. Make sure you've set the BNDL bit in your application's file info.
  7686. You may also have to rebuild your desktop. Ie hold down ctrl and cmd
  7687. during boot (just before the finder starts).
  7688. --
  7689. Amrik Thethi.   Tel. +223 421 008 Fax. +223 421 024
  7690. Setanta Software Ltd.  Internet: at@setanta.demon.co.uk
  7691. Cambridge, UK.
  7692.  
  7693. 6]==============================================
  7694. Hi,
  7695.  
  7696. You should do two things:
  7697. 1) Set the hasCustomIcon bit with ResEdit's "Get File Info..."  menu (or with
  7698.    utilities like FileTyper, or FileBuddy, if you have them...).
  7699. 2) Include in your application's resource fork an icon family (ics, icl and
  7700.    ICON resources) with ID=... hmmm... I don't remember the ID, nor have
  7701.    access to IM volumes, at this time...
  7702.    You can obtain the right ID by pasting an icon onto a file on the Finder,
  7703.    and looking into their resource fork. It should be -16xxx.
  7704.  
  7705. Hope this helps.
  7706.  
  7707. Bye,
  7708. Marco
  7709.  
  7710. 7]==============================================
  7711. Well, given that you have set the BNDL correctly, you will probably find that
  7712. your custom icon will only appear once you have rebuilt the desktop.
  7713.  
  7714. (To bebuild your desktop, restart, hold the command and option keys down
  7715. until
  7716. your machine asks you if you want to rebuild the desktop).
  7717.  
  7718. Lindsay
  7719.  
  7720. 8]==============================================
  7721. There should also be an FREF resource. You have to rebuild the desktop
  7722. before getting the icon. When you create the file you chould also
  7723. check or uncheck the box 'initted', I always forget which. But, I believe
  7724. you should uncheck it, because I THINK that this indicates whether it has
  7725. been processed for the desktop file or not. But I'm not sure about the
  7726. last thing.
  7727.  
  7728.   Good Luck,
  7729.      Olle
  7730. ---------------------------------------------------
  7731. - #1,3,6 method is same.  This method works fine, but the icon can be removed
  7732. by pressing delete key after select the icon from Get Info menu of System 7.
  7733.  I guess my question was unclear.  I wanted to have a custom icon that cannot
  7734. be deleted by pressing the delete key.
  7735. - I found what I did wrong.  After I compiled my program, the compiler
  7736. assigned "????" for the "Creator".  After I assigned  as same signature to
  7737. the "Creator" field as BNDL resource's signature, it worked.
  7738.  
  7739. *for the people who is a beginner like me*
  7740. 1) by using ResEdit, select Get Info from the menu, and choose your
  7741. application.
  7742. 2) set Creator signature as you like.  (4 characters long.  ex. 'Test')
  7743. 3) open your application by ResEdit
  7744. 4) create all the icons.  (icl, ics...etc)
  7745. 5) Create BNDL resource. ('FREF' resource creates automatically)
  7746. 6) from BNDL, you'll see this and set it as:
  7747. Signature [Test] <--- Same signature as "Creator"
  7748. Type | Finder Icons
  7749. -------------
  7750. APPL| <Select Icon  you created >
  7751.  
  7752. I guess I made a stupid mistake, and asked for help with unclear question.
  7753.  Anyways, I really appreciate everyone who has answered.
  7754.  
  7755. Sincerely,
  7756. sjkim@aol.com
  7757.  
  7758.  
  7759. >From canna@bga.com 30 May 94 17:01:20 GMT
  7760. Path: ucivax!gateway
  7761. From: canna@bga.com (Lloyd Sargent)
  7762. Subject: Address of Function Problem (for callback)...
  7763. Message-ID: <9405301001.aa19578@q2.ics.uci.edu>
  7764. Content-Type: text/plain; charset="us-ascii"
  7765. Mime-Version: 1.0
  7766. Newsgroups: fa.think-c
  7767. X-Message-ID: <199405301701.AA00122@zoom.bga.com>
  7768. Approved: usenet@q2.ics.uci.edu
  7769. Lines: 26
  7770. Date: 30 May 94 17:01:20 GMT
  7771.  
  7772. I have been trying to get this thing to spit out the right code for the
  7773. last 4 days. I have consistantly fail.  The code is simple and looks like
  7774. the following:
  7775.  
  7776. Session->paramblock.startParam.ioCompletion = (ProcPtr) OpenSessionCallback;
  7777.  
  7778. Fortunately, MOST of the code seems to be correct. It comes out as:
  7779.  
  7780.         LEA OpenSessionCallBack,A0
  7781.  
  7782. What is weird is that it generates the correct offset (EA), but tries to
  7783. address it off of A5 instead of the PC. Has anyone else had this prob and
  7784. do they have a solution? This is really annoying.
  7785.  
  7786. Thanks!
  7787.  
  7788. ----------------------------+-----------------------------------------
  7789. Lloyd Sargent               | "It's binary - it either works or it doesn't"
  7790. Head Honcho                 | Internet:  canna@bga.com
  7791. Canna Software Development  | AOL:       lgsargent@aol.com
  7792. 14308-B FM 812              | Phone:     (512) 243-0283, (512) 243-3355
  7793. Del Valle, Texas 78617      | Fax:       (512) 243-0283  (8-5 CST)
  7794.  
  7795.     "My company believes in First Admendment rights. So there!"
  7796.  
  7797.  
  7798. >From ST801256@brownvm.brown.edu 31 May 94 00:45:50 GMT
  7799. Path: ucivax!gateway
  7800. From: ST801256@brownvm.brown.edu (Joel Henderson)
  7801. Subject: Where's the FAQ & archives?
  7802. Message-ID: <9405301745.aa04939@q2.ics.uci.edu>
  7803. Newsgroups: fa.think-c
  7804. X-Message-ID: <9405301745.aa04939@q2.ics.uci.edu>
  7805. Approved: usenet@q2.ics.uci.edu
  7806. Organization: EOS / Educational Online Sources <eos1@brown.edu>
  7807. Lines: 36
  7808. Date: 31 May 94 00:45:50 GMT
  7809.  
  7810. Trivial question, sorry to bother you: where's the FAQ & archives?
  7811. Better question: how would I have found out for myself, instead of posting?
  7812.  
  7813. Real question: I'm helping a school set up a "mini-server" of hypercard
  7814. stacks (yes, this will relate to TCL) accessible via Mosaic. Kids browse
  7815. html descriptions of projects, click on one they want to see, and Mosaic
  7816. downloads the stack and pipes it into hypercard.
  7817.  
  7818. I'd like for hypercard to be able to "talk back" to Mosaic, so that
  7819. buttons can contain hrefs. I assume I'll use XCMD-->AppleEvents, unless
  7820. someone suggests something better. So I'm looking for TCL classes for
  7821. AppleEvents, ideally with a small demo program, so that I can learn
  7822. them. I'm also looking for classes to handle display & formatting
  7823. of HTML, or possibly a more general tokenizer class.
  7824.  
  7825. One person has suggested skipping Mosaic and using hypercard as the
  7826. browser, and sending AppleScript commands to Fetch to ftp the stacks.
  7827. How does TCL work with AppleScript? I was under the impression that
  7828. A.S. was merely an easy way to write AppleEvents.
  7829.  
  7830. The AppleEvents are also necessary to write a small app which gives each
  7831. teacher a small edittext window which talks to a centralized admin/tech
  7832. person. I know a zillon things like this must have been written, but they
  7833. want it incorporated into an existing TCL project and tweaked (security
  7834. in particular, meaning that if someone has a DES or Kerberos class I'd be
  7835. thrilled).
  7836.  
  7837. Thanks in advance for help.
  7838.  
  7839. - Joel
  7840.  
  7841. --------------------------------------------------------------------------
  7842. Joel_Henderson@Brown.Edu           Web--> http://home.eos.brown.edu/eos1/
  7843. EOS: Educational Online Sources    FTP/Gopher--> home.eos.brown.edu
  7844. Box 2325 / Providence, RI 02906    Send mail to eosmailer@brown.edu
  7845. eos1@brown.edu / 1-800-ask-eos1    and somewhere in it write: help!
  7846. >From andy.law@afrc.ac.uk 31 May 94 07:38:34 GMT
  7847. Path: ucivax!gateway
  7848. From: andy.law@afrc.ac.uk (Big Nose)
  7849. Subject: Symantec 7.0.2 updater homage requirements
  7850. X400-Originator: andy.law@afrc.ac.uk
  7851. Content-Identifier: 1185FA200200
  7852. Message-ID: <9405310038.aa17235@q2.ics.uci.edu>
  7853. X400-Recipients: think-c@ics.uci.edu
  7854. Sensitivity: Company-Confidential
  7855. Newsgroups: fa.think-c
  7856. X-Message-ID: <2716340831051994/A17043/IAPE/1185FA200200*@MHS>
  7857. X400-Received: by mta sun.mhs-relay.ac.uk in /PRMD=uk.ac/ADMD= /C=gb/; Relayed; Tue, 31 May 1994 08:35:24 +0100
  7858. X400-Received: by mta arcs.afrc.ac.uk in /PRMD=UK.AC/ADMD= /C=GB/; Relayed; Tue, 31 May 1994 08:36:31 +0100
  7859. X400-Received: by /PRMD=UK.AC/ADMD= /C=GB/; converted (ia5 text (2)); Relayed; Tue, 31 May 1994 09:34:24 +0100
  7860. Approved: usenet@q2.ics.uci.edu
  7861. X400-Content-Type: P2-1988 (22)
  7862. Lines: 14
  7863. Date: 31 May 94 07:38:34 GMT
  7864. X400-MTS-Identifier: [/PRMD=UK.AC/ADMD= /C=GB/;2716340831051994/A17043/IAPE]
  7865.  
  7866.  
  7867. Pete Gontier wrote:
  7868.  
  7869. [... stuff about rigmarole of updating deleted ...]
  7870.  
  7871. >Does anybody have any suggestions how to avoid the above sequence?
  7872.  
  7873. (or words to that effect)
  7874.  
  7875. Buy CodeWarrior? :)
  7876.  
  7877.  
  7878. Andy Law
  7879. ( Lawa @ afrc.ac.uk                             Big Nose in Edinburgh )
  7880. >From pindar3@cix.compulink.co.uk 31 May 94 12:09:30 GMT
  7881. Path: ucivax!gateway
  7882. From: pindar3@cix.compulink.co.uk (Pindar Infotek Ltd)
  7883. Subject: sfHookNullItem constant
  7884. Message-ID: <9405310509.aa09689@q2.ics.uci.edu>
  7885. Newsgroups: fa.think-c
  7886. Reply-To: pindar3@cix.compulink.co.uk
  7887. X-Message-ID: <memo.249805@cix.compulink.co.uk>
  7888. Approved: usenet@q2.ics.uci.edu
  7889. Lines: 22
  7890. Date: 31 May 94 12:09:30 GMT
  7891.  
  7892.  
  7893. >From Pindar user Ian McCall
  7894.  
  7895. Subject: _sfHookNullItem constant
  7896. I'm trying to put together a dialogue hook for CustemGetFile that
  7897. does some processing on the sfHookNullEvent. At the end of this
  7898. processing, according to THINK Reference and Inside Mac VI 26-12 I'm
  7899. supposed to return the constant sfHookNullItem.
  7900.  
  7901. The trouble is - no such constant is defined! Anywhere, in any
  7902. header. At the moment I'm returning zero, but I've no idea if this is
  7903. what the constant should be.
  7904.  
  7905. Anyone ever found this constant? Or does anyone know what I should
  7906. return after a sfHookNullEvent?
  7907.  
  7908.  
  7909.  
  7910. ---
  7911. Please make 'Attn:<space>Ian McCall' the first line of your reply
  7912. (not the subject) to ensure automatic forwarding to the correct
  7913. Pindar user.
  7914. >From doglan@script.org.ar 31 May 94 15:34:23 GMT
  7915. Path: ucivax!gateway
  7916. From: doglan@script.org.ar (Diego Akerman)
  7917. Subject: RE: how to turn on program linking without chooser
  7918. Message-ID: <9405310834.aa17591@q2.ics.uci.edu>
  7919. Newsgroups: fa.think-c
  7920. X-Message-ID: <199405311531.AA02222@atina.ar>
  7921. Approved: usenet@q2.ics.uci.edu
  7922. Lines: 19
  7923. Date: 31 May 94 15:34:23 GMT
  7924.  
  7925. Hi Will!
  7926. >Does anyone know how to turn on program linking in sys 7 without using
  7927. >the chooser?  I can't seem to find anything in Think Reference.
  7928. >
  7929. >-->Will
  7930.  
  7931. I think you are mistaken, program linking is not turned on from the Chooser, you
  7932. toggle it from the Sharing Setup control panel. On the other hand, there are a
  7933. couple of utilities that turn on/off program linking without the control panel
  7934. intervention. I think they are from Ambrosia Software.
  7935.  
  7936. Hope this helps. Doglan//
  7937. ________________________________________________________________________________
  7938.   _/_/_/_/ _/_/_/_/ _/_/_/_/ _/_/  _/_/ _/  | DiegO GabrieL AkermaN
  7939.  _/       _/    _/ _/    _/ _/  _/  _/ _/   |
  7940. _/_/_/_/ _/_/_/_/ _/_/_/_/ _/  _/  _/ _/    | Av. Jorge Newbery 3800
  7941.      _/ _/       _/    _/ _/      _/        | 1427 Buenos Aires, Argentina
  7942. _/_/_/ _/       _/    _/ _/      _/ _/      |
  7943.                                             | E-Mail: doglan@script.org.ar
  7944. >From nagel@rdatasys.rdatasys.com 31 May 94 16:21:53 GMT
  7945. Path: ucivax!gateway
  7946. From: nagel@rdatasys.rdatasys.com ("Mark D. Nagel")
  7947. Subject: ADMIN: list future (was Re: Symantec 7.0.2 updater...)
  7948. Message-ID: <9405310921.aa21128@q2.ics.uci.edu>
  7949. In-reply-to: Big Nose's message of 31 May 1994 07:38:34 GMT.
  7950.         <9405310038.aa17235@q2.ics.uci.edu>
  7951. Newsgroups: fa.think-c
  7952. X-Message-ID: <27106.770400594@rdatasys>
  7953. Reply-To: mark.nagel@rdatasys.rdatasys.com
  7954. Approved: usenet@q2.ics.uci.edu
  7955. Organization: Relational Data Systems, Irvine, CA
  7956. Lines: 43
  7957. Date: 31 May 94 16:21:53 GMT
  7958. Phone: (714) 263-3899
  7959.  
  7960. On 31 May 1994 07:38:34 GMT Big Nose wrote:
  7961.  
  7962.     Pete Gontier wrote:
  7963.  
  7964.     [... stuff about rigmarole of updating deleted ...]
  7965.  
  7966.     >Does anybody have any suggestions how to avoid the above sequence?
  7967.  
  7968.     (or words to that effect)
  7969.  
  7970.     Buy CodeWarrior? :)
  7971.  
  7972. Good answer!  This actually is an interesting point that has some
  7973. bearing on the future of this list.  Currently, this list is
  7974. chartered to discuss THINK C and Symantec C++ compilers and
  7975. associated issues.  It should certainly continue to do so, but with
  7976. the introduction of CodeWarrior, I wonder whether it would be a good
  7977. idea to expand the charter to discuss that as well.  I know that my
  7978. next compiler purchase will be from Metrowerks and I imagine that is
  7979. true for many others on this list.  On the other hand, there probably
  7980. already is a list for CodeWarrior, so it would be redundant to
  7981. overlap with that lists discussions.
  7982.  
  7983. What do others think about this?
  7984.  
  7985. On another administrative note, I want everyone to be aware that
  7986. there will soon be a major shift in the way the list works as I move
  7987. its base of operations from UC Irvine to Relational Data Systems.  I
  7988. am currently testing the ListProcessor mailing list package and I'm
  7989. pleased with it so far.  It will allow for archive browsing and
  7990. retrieval, automatic list subscription/deletion, options such as
  7991. digesting of list mail, and many other cool features.  I will
  7992. attempt to make the transition as smooth as possible, but there are
  7993. bound to be _some_ problems.  Consider this advance warning.  I will
  7994. make another announcement prior to the switchover and I intend to
  7995. resolve all problems as quickly as possible.
  7996.  
  7997. Mark
  7998. --------
  7999. Mark D. Nagel <mark.nagel@rdatasys.com>      Relational Data Systems
  8000.                                              30 Executive Park, Suite 260
  8001. Eat right.  Exercise.  Die anyway.           Irvine, CA 92714
  8002.                                              (714) 263-3899
  8003. >From gurgle@netcom.com 31 May 94 19:51:43 GMT
  8004. Path: ucivax!gateway
  8005. From: gurgle@netcom.com (Pete Gontier)
  8006. Subject: Re: EDS-7.0.2 - CNFG problem, the clue(?)
  8007. Message-ID: <9405311251.aa04075@q2.ics.uci.edu>
  8008. In-Reply-To: <9405281004.aa19856@q2.ics.uci.edu> from "Jean Berthomieu" at May 28, 94 05:04:04 pm
  8009. X-Mailer: ELM [version 2.4 PL23]
  8010. Content-Transfer-Encoding: 7bit
  8011. Content-Type: text/plain; charset=US-ASCII
  8012. Content-Length: 754
  8013. MIME-Version: 1.0
  8014. Newsgroups: fa.think-c
  8015. X-Message-ID: <199405311951.MAA15719@netcom.com>
  8016. Approved: usenet@q2.ics.uci.edu
  8017. Lines: 15
  8018. Date: 31 May 94 19:51:43 GMT
  8019.  
  8020. > Now, that's the clue: The CNFG resources both had a name, and they
  8021. > should not (to be patched). So instead of reinstalling the whole
  8022. > stuff, you may use Resedit and clear the resources names for CNFG 0
  8023. > and 1 (in the Get Info dialog). Then you can apply the patch!
  8024.  
  8025. I managed to do this, but I also had a similar problem with the C
  8026. translator. Unfortunately, the CNFG resources in the C translator have
  8027. no names, so they cannot be deleted! :-) Anybody have clues on this?
  8028.  
  8029. --
  8030.  Pete Gontier, CTO, Integer Poet Software; gurgle@netcom.com
  8031.  
  8032.  '"We believe the customer goes to retail stores to buy Microsoft
  8033.  software," said Ed Belleba, director of retail strategy at Microsoft.'
  8034.                                                      -- MacWEEK 4/18/94
  8035. >From berthoms@frbdx11.cribx1.u-bordeaux.fr 31 May 94 21:19:04 GMT
  8036. Path: ucivax!gateway
  8037. From: berthoms@frbdx11.cribx1.u-bordeaux.fr (Jean Berthomieu)
  8038. Subject: Re: EDS-7.0.2 - CNFG problem, the clue(?)
  8039. Message-ID: <9405311419.aa09465@q2.ics.uci.edu>
  8040. In-Reply-To: <199405311951.MAA15719@netcom.com> from "Pete Gontier" at May 31, 94 12:51:28 pm
  8041. Content-Type: text
  8042. Content-Length: 487
  8043. Newsgroups: fa.think-c
  8044. X-Message-ID: <9405312216.AA17706@frbdx11.cribx1.u-bordeaux.fr>
  8045. Approved: usenet@q2.ics.uci.edu
  8046. Lines: 11
  8047. Date: 31 May 94 21:19:04 GMT
  8048.  
  8049. This is a pure guess, but I imagine the CNFG resources keep your preferences
  8050. settings (?) If you reset them to "Factory settings",
  8051. ..maybe the resource is reset to the right value for the patch to apply ?
  8052. I had no problem with the C translator, (and I wouldn't try to redo the whole
  8053. process just to know if I'm true :-)), in any case it should not be a big
  8054. work to try it while you still have the 7.0 version.
  8055.  
  8056. Best regards.
  8057.  
  8058.    Jean Berthomieu <berthoms@frbdx11.cribx1.u-bordeaux.fr>
  8059.  
  8060. >From waldorfm@admina.rferl.org 31 May 94 22:09:00 GMT
  8061. Path: ucivax!gateway
  8062. From: waldorfm@admina.rferl.org (Markus Waldorf)
  8063. Subject: using Gestalt to get system version
  8064. Content-transfer-encoding: 7BIT
  8065. X-Message-ID: <01HD0AOZN6ZM90OTQ4@AdminA.RFERL.Org>
  8066. Approved: usenet@q2.ics.uci.edu
  8067. Lines: 15
  8068. Date-warning: Date header was inserted by AdminA.RFERL.Org
  8069. Date: 31 May 94 22:09:00 GMT
  8070. X-Sender: waldorfm@muvaxb.rferl.org
  8071. Message-ID: <9405311508.aa12837@q2.ics.uci.edu>
  8072. Content-type: text/plain; charset="us-ascii"
  8073. MIME-version: 1.0
  8074. Newsgroups: fa.think-c
  8075.  
  8076. Hi,
  8077.  
  8078.         I assume a Gestalt call is a good way to obtain the version
  8079. of the current system software. Can someone please provide me some
  8080. info? Thanks!
  8081.  
  8082. --------------------------------------------------------------------------
  8083.     _/_/    _/_/_/ _/_/_/    Markus Waldorf                     _/_/    _/
  8084.    _/  _/  _/     _/        Information Technology Consultant  _/  _/  _/
  8085.   _/_/    _/_/   _/_/      RFE/RL Inc, Munich, Germany        _/_/    _/
  8086.  _/  _/  _/     _/        Compu$erve: 100022,2373            _/  _/  _/
  8087. _/  _/  _/     _/_/_/    Internet: waldorfm@rferl.org       _/  _/  _/_/_/
  8088. --------------------------------------------------------------------------
  8089.  
  8090.  
  8091. >From cklarson@engr.ucdavis.edu 31 May 94 22:19:19 GMT
  8092. Path: ucivax!gateway
  8093. From: cklarson@engr.ucdavis.edu (Christopher Klaus Larson)
  8094. Subject: Re: sfHookNullItem constant
  8095. Message-ID: <9405311519.aa13578@q2.ics.uci.edu>
  8096. In-Reply-To: <9405310509.aa09689@q2.ics.uci.edu>
  8097. Content-Type: TEXT/PLAIN; charset=US-ASCII
  8098. Mime-Version: 1.0
  8099. Newsgroups: fa.think-c
  8100. X-Message-ID: <Pine.3.89.9405311553.A6601-0100000@relleno.engr.ucdavis.edu>
  8101. Approved: usenet@q2.ics.uci.edu
  8102. Lines: 15
  8103. Date: 31 May 94 22:19:19 GMT
  8104.  
  8105. On 31 May 1994, Pindar Infotek Ltd wrote:
  8106.  
  8107. > Anyone ever found this constant? Or does anyone know what I should
  8108. > return after a sfHookNullEvent?
  8109.  
  8110. If memory serves, you should just return sfHookNullEvent.
  8111.  
  8112. --Chris
  8113. _______________________________________________________________________________
  8114. Chris Larson -- Amateur Macintosh Geek,
  8115. Davis Institute of Slowly and Painfully Working Out the Surprisingly Obvious
  8116.  
  8117. (Insert disclaimer here)
  8118. Internet: cklarson@engr.ucdavis.edu
  8119.  
  8120. >From waldorfm@admina.rferl.org 31 May 94 22:29:33 GMT
  8121. Path: ucivax!gateway
  8122. From: waldorfm@admina.rferl.org (Markus Waldorf)
  8123. Subject: KeyMap and codes
  8124. Content-transfer-encoding: 7BIT
  8125. X-Message-ID: <01HD0BEO9GCI90P806@AdminA.RFERL.Org>
  8126. Approved: usenet@q2.ics.uci.edu
  8127. Lines: 32
  8128. Date-warning: Date header was inserted by AdminA.RFERL.Org
  8129. Date: 31 May 94 22:29:33 GMT
  8130. X-Sender: waldorfm@muvaxb.rferl.org
  8131. Message-ID: <9405311529.aa14260@q2.ics.uci.edu>
  8132. Content-type: text/plain; charset="us-ascii"
  8133. MIME-version: 1.0
  8134. Newsgroups: fa.think-c
  8135.  
  8136. So far it's clear, but one thing that I don understand (not sure) is,
  8137. why the Shift key is Hex 38. According to ASCII, this is "8".
  8138.  
  8139.  
  8140. KeyMap  keys;                   // defined in <Events.h>
  8141.  
  8142. /*
  8143.         typedef long KeyMap[4]<->16 byte binary map of key states.
  8144.         The 16 keys bytes are in left to right order but the bits are
  8145.         in right to left order in each byte.
  8146.  
  8147.         The Shift key is 0x38 which is decimal 56 and dividing by 8
  8148.         (56/8=7) means it's bit is in the 7th byte which is the rightmost
  8149.         byte of keys[1] and is the rightmost bit in that byte
  8150.         (56/8=7 remainder 0).
  8151. */
  8152.  
  8153.  
  8154.         GetKeys( keys );
  8155.  
  8156.         if ( Button() || ( 1 & keys[1] ) )
  8157.         ....
  8158.  
  8159. --------------------------------------------------------------------------
  8160.     _/_/    _/_/_/ _/_/_/    Markus Waldorf                     _/_/    _/
  8161.    _/  _/  _/     _/        Information Technology Consultant  _/  _/  _/
  8162.   _/_/    _/_/   _/_/      RFE/RL Inc, Munich, Germany        _/_/    _/
  8163.  _/  _/  _/     _/        Compu$erve: 100022,2373            _/  _/  _/
  8164. _/  _/  _/     _/_/_/    Internet: waldorfm@rferl.org       _/  _/  _/_/_/
  8165. --------------------------------------------------------------------------
  8166.  
  8167.  
  8168. ------------------------------ Cut here ------------------------------
  8169.